Code Monkey home page Code Monkey logo

fastlane-plugin-lizard's Introduction

Hi there 👋 I'm Moses Liao

I am a backend server developer, DevOps and SRE Engineer, and cloud architect

Services have to be secure and reliable, hence you find my interest in a cloud architect and site reliability engineering. I ensure SLA by doing load testing and deploying monitoring tools on apps to make sure anything that can bring the servers down will be pick up by me or someone similar to me first.

  • 🔭 I’m currently working on ...

    • a special grafana proxy to cache search results so that it gets displayed quickly. The targetted database is splunk, with the hope it can expand to other different source or form of database soon.
  • 🌱 I’m currently learning ...

    • Microsoft Azure infrastructure, to complement with my AWS solution architect certificate
  • 👯 I’m looking to collaborate on ...

    • Plug and play data sources for chatGPT like AI, where the data can be quickly learned and be put forward as useful information when someone wants to search for something.
  • 🤔 I’m looking for help with ...

    • Understanding ChatGPT or similar AI that can help on the above work.

📫 How to reach me: ...

LinkedIn Medium

Language and tools

Ruby Python PHP Red Hat Docker Jenkins Splunk

Certification

Terraform

fastlane-plugin-lizard's People

Contributors

aserdobintsev avatar atul9 avatar friederbluemle avatar gabe-labs avatar limfinity avatar mgrebenets avatar mosesliao avatar terryyin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fastlane-plugin-lizard's Issues

Lizard finished with errors (exit code: 0) (FastlaneCore::Interface::FastlaneError)

Hi, wanted to use the plugin today. Got the error bellow.

I am using fastlane 2.93.1
lizard (1.14.10)
Python 2.7.10 (default, Oct 6 2017, 22:29:07)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

my fastlane looks like this

lane :sonarscan do

  lizard(
  source_folder: 'XXXXX/Classes',
  language: 'swift,objectivec',
  export_type: 'xml',
  report_file: 'sonar-reports/lizard-report.xml'
)
  sonar(
    project_configuration_path: "../",
    sonar_login: "XXXXXXX",
    sonar_runner_args:"-Dsonar.host.url=https://XXXXXXXX"
  )
  end
DEBUG [2018-04-30 15:21:56.80]: All plugins are up to date
ERROR [2018-04-30 15:21:56.80]: fastlane finished with errors
DEBUG [2018-04-30 15:21:56.80]: All plugins are up to date
/Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane_core/lib/fastlane_core/ui/interface.rb:133:in `user_error!': [!] Lizard finished with errors (exit code: 0) (FastlaneCore::Interface::FastlaneError)
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-lizard-1.1.1/lib/fastlane/plugin/lizard/actions/lizard_action.rb:68:in `handle_lizard_error'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-lizard-1.1.1/lib/fastlane/plugin/lizard/actions/lizard_action.rb:31:in `rescue in run'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-plugin-lizard-1.1.1/lib/fastlane/plugin/lizard/actions/lizard_action.rb:27:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/runner.rb:257:in `block (2 levels) in execute_action'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/runner.rb:236:in `block in execute_action'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/runner.rb:231:in `chdir'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/runner.rb:231:in `execute_action'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/fast_file.rb:148:in `method_missing'
	from Fastfile:54:in `block (2 levels) in parsing_binding'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/lane.rb:33:in `call'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/lane_manager.rb:59:in `cruise_lane'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/commands_generator.rb:107:in `block (2 levels) in run'
	from /Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
	from /Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:75:in `run!'
	from /Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/commands_generator.rb:332:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/fastlane/lib/fastlane/cli_tools_distributor.rb:108:in `take_off'
	from /Library/Ruby/Gems/2.3.0/gems/fastlane-2.93.1/bin/fastlane:20:in `<top (required)>'
	from /usr/local/bin/fastlane:22:in `load'
	from /usr/local/bin/fastlane:22:in `<main>'
matrixsmacdanil-wifi:preventivecare danila$

Metric 'file_complexity' should not be computed by a Sensor

[35mjava.lang.UnsupportedOperationException: Metric 'file_complexity' should not be computed by a Sensor�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:253)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.index.DefaultIndex.addMeasure(DefaultIndex.java:153)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:128)�[0m [14:08:18]: ▸ �[35mat org.sonar.plugins.objectivec.complexity.LizardMeasurePersistor.saveMeasures(LizardMeasurePersistor.java:78)�[0m [14:08:18]: ▸ �[35mat org.sonar.plugins.objectivec.complexity.LizardSensor.analyse(LizardSensor.java:75)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)�[0m [14:08:18]: ▸ �[35mat org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)�[0m [14:08:18]: ▸ �[35mat org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)�[0m [14:08:18]: ▸ �[35mat org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)�[0m [14:08:18]: ▸ �[35mat org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)�[0m [14:08:18]: ▸ �[35mat org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)�[0m [14:08:18]: ▸ �[35mat org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)�[0m [14:08:18]: ▸ �[35mat org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)�[0m [14:08:18]: ▸ �[35mat org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)�[0m [14:08:18]: ▸ �[35mat org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)�[0m [14:08:18]: ▸ �[35mat org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)�[0m [14:08:18]: ▸ �[35mat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)�[0m [14:08:18]: ▸ �[35mat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)�[0m [14:08:18]: ▸ �[35mat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)�[0m [14:08:18]: ▸ �[35mat java.lang.reflect.Method.invoke(Method.java:498)�[0m [14:08:18]: ▸ �[35mat org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)�[0m [14:08:18]: ▸ �[35mat com.sun.proxy.$Proxy0.execute(Unknown Source)�[0m [14:08:18]: ▸ �[35mat org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:171)�[0m [14:08:18]: ▸ �[35mat org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:128)�[0m [14:08:18]: ▸ �[35mat org.sonarsource.scanner.cli.Main.execute(Main.java:111)�[0m [14:08:18]: ▸ �[35mat org.sonarsource.scanner.cli.Main.execute(Main.java:75)�[0m [14:08:18]: ▸ �[35mat org.sonarsource.scanner.cli.Main.main(Main.java:61)�[0m

Getting 'Your lizard version is outdated' error although it isn't

Hello, I'm having some trouble adding lizard into my fastlane script

lane :metrics do
    scan(scheme: "Scheme", code_coverage: true, derived_data_path: "./DerivedData", output_directory: "./reports")
    slather(cobertura_xml: true, jenkins: true, scheme: "Scheme", build_directory: "./DerivedData", output_directory: "./reports", proj: "./Project.xcodeproj")
    lizard(source_folder: "./Sources", language: "swift", export_type: "xml", report_file: "report/lizard-report.xml", executable: "/Library/Python/2.7/site-packages")
    swiftlint(output_file: "./reports/swiftlint.txt", ignore_exit_status: true)
    sonar
  end

fastlane: 2.105.2
lizard: 1.15.6
python: 2.7.10

I'm getting an error: "Your lizard version is outdated, please upgrade to at least version 1.14.10 and start your lane again!", although lizard is 1.15.6 which is clearly newer than 1.14.10. Not sure where to go from here, would appreciate any help. Thank you.

New Image for social preview

Hi guys, I have a few images to put up for social preview of this plugin. Please give a vote by giving a 👍in the comments

Lizard exclude parameter being generated incorrectly by the plugin

I tried to set a exclude parameter with multiple patterns but the plugin is incorrectly generating the command so lizard ignores the patterns.

Here's the plugin call on fastlane

lizard(
      source_folder: ".", 
      exclude: "./Folder1/Subfolder1/*, ./Folder2/*",
      language: "swift", 
      export_type: "xml", 
      report_file: "sonar-reports/lizard-report.xml"
    )

The command generated is:
lizard -l swift --xml -x ./Folder1/Subfolder1/* -x ./Folder2/* . > sonar-reports/lizard-report.xml

But according to lizard documentation it should be:
lizard -l swift --xml -x "./Folder1/Subfolder1/*" -x "./Folder2/*": . > sonar-reports/lizard-report.xml

Reference: https://github.com/terryyin/lizard/blob/master/README.rst
Don't forget to add "" around the pattern.

Doesn't accept multi exclude path

When calling lizard from CLI we can specify as many --exclude paths as we need but astlane-plugin-lizard accepts only one.

I propose to change exclude parameter to accept an array of paths.

Rspec tests for fastlane-plugin-lizard

So far this plugin has no rspec test, because I am not sure what kind of test a lizard or a fastlane user will need in this plugin.

Let's contribute ideas what kind of tests this plugin needs, then we will look into the CI/CD needed to run the process

Lizard finished with errors (exit code: 0)

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.