mosesliao / fastlane-plugin-lizard

🦎Official fastlane plugin for lizard code complexity analytics 🦎
http://www.lizard.ws/
MIT License
28 stars 13 forks source link

Lizard finished with errors (exit code: 0) #45

Closed TomVanDerSpek closed 4 years ago

TomVanDerSpek commented 4 years ago

When I run my fastfile lane I get the following error when lizard is being executed after about 40 seconds.

[13:55:54]: --------------------
[13:55:54]: --- Step: lizard ---
[13:55:54]: --------------------
Shell command exited with exit status 1 instead of 0.
[13:56:37]: 
[13:56:37]: Lizard finished with exit code 0, which represents a failure.

It doens't give any more information than this unfortunately.

Contents of my lane:

lizard(
  language: "swift", 
  export_type: "xml", 
  report_file: "./fastlane/lizard-report.xml", 
  executable: "/Library/Python/3.7/site-packages/lizard.py"
)

What makes it strange is that when I run the following command directly in terminal it does finish without any errors and with a xml output. python3 /Library/Python/3.7/site-packages/lizard.py ./ -l swift --xml

Any idea what is going wrong?

mosesliao commented 4 years ago

Hi, can you try indicate your source_folder?

mosesliao commented 4 years ago

I think I know why. Probably is this line over here https://github.com/liaogz82/fastlane-plugin-lizard/blob/master/lib/fastlane/plugin/lizard/actions/lizard_action.rb#L17. it doesn't take in python3

@friederbluemle any suggestion? @mgrebenets @terryyin

mosesliao commented 4 years ago

from the stackoverflow link it seems to be pretty difficult to find out what is the version of the python the user is using via bash or sh. Probably have to fix it at python3? @terryyin you are better in advising this since you are the one creating lizard

terryyin commented 4 years ago

I can take a look, but what is causing the problem?

TomVanDerSpek commented 4 years ago

Thanks a lot @liaogz82 ! Specifying the source_folder fixed it. It used to go through the whole repo but now only the folder with the code. But I do wonder why I don't get any errors when using lizard directly in the terminal 🤔 It is executed in the same folder as Fastlane. It also didn't make a difference when I used "python" instead of "python3" in the terminal command.

mosesliao commented 4 years ago

@TomVanDerSpek I suspect the user or role that run fastlane may not have the rights to scan all the folders and file, but the command line you run may use a user with stronger rights.

I close this issue since it resolved your problem