From a85b83895887bf996d26ef0b67500ddcee8ea50d Mon Sep 17 00:00:00 2001 From: Frieder Bluemle Date: Tue, 27 Mar 2018 23:28:56 +0800 Subject: [PATCH] Update README.md --- README.md | 91 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 54 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 51c8fe8..ea0d9be 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,27 @@ -

- - - -
-

Lizard Fastlane Plugin

-

- -[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-lizard) -[![Gem Version](https://badge.fury.io/rb/fastlane-plugin-lizard.svg)](https://badge.fury.io/rb/fastlane-plugin-lizard) -[![CircleCI](https://circleci.com/gh/liaogz82/fastlane-plugin-lizard.svg?style=svg&circle-token=6d2bc552098ad6c8955ddecc9b058827e91e25cf)](https://circleci.com/gh/liaogz82/fastlane-plugin-lizard) -[![codecov](https://codecov.io/gh/liaogz82/fastlane-plugin-lizard/branch/master/graph/badge.svg)](https://codecov.io/gh/liaogz82/fastlane-plugin-lizard) +# fastlane-plugin-lizard + +[![fastlane Plugin Badge][1]][2] +[![Gem Version][3]][4] +[![CircleCI][5]][6] +[![codecov][7]][8] ## Getting Started -This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To get started with `fastlane-plugin-lizard`, add it to your project by running: +This project is a [_fastlane_][9] plugin. To get started with +`fastlane-plugin-lizard`, add it to your project by running: ```bash fastlane add_plugin lizard ``` -## About lizard +## About Lizard + +Lizard is an extensible Cyclomatic Complexity Analyzer for many imperative programming +languages including C/C++ (doesn't require all the header files or Java imports). -Lizard is an extensible Cyclomatic Complexity Analyzer for many imperative programming languages including C/C++ (doesn't require all the header files or Java imports). +For more information check out the [GitHub repository][10] -For more information check out the [Github repository](https://github.com/terryyin/lizard) +![Lizard][11] ## Lizard Actions @@ -31,34 +29,34 @@ Lizard has only one action so far ```ruby lizard( - source_folder: "foo", - language: "swift", - export_type: "csv", - report_file: "bar.csv" + source_folder: 'foo', + language: 'swift', + export_type: 'csv', + report_file: 'bar.csv' ) ``` -For multiple languages +### Options + +#### Multiple languages ```ruby -lizard( - source_folder: "foo", - language: "swift,objectivec", - export_type: "csv", - report_file: "bar.csv" -) +language: 'swift,objectivec' +``` + +#### XML reports + +```ruby +export_type: 'xml' ``` ## Sonar Swift Usage +In the default configuration, the [Backelite sonar-swift plugin][15] for SonarQube +expects an xml report located at `sonar-reports/lizard-report.xml`: + ```ruby -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: "[SOURCE_FOLDER]", export_type: "xml", report_file: "report/lizard-report.xml") - swiftlint(output_file: "./reports/swiftlint.txt", ignore_exit_status: true) - sonar -end +lizard(source_folder: 'foo', export_type: 'xml', report_file: 'sonar-reports/lizard-report.xml') ``` ## Issues and Feedback @@ -67,12 +65,31 @@ For any other issues and feedback about this plugin, please submit it to this re ## Troubleshooting -If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide. +If you have trouble using plugins, check out the [Plugins Troubleshooting][12] +guide. ## Using _fastlane_ Plugins -For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/). +For more information about how the `fastlane` plugin system works, check out the +[Plugins documentation][13]. ## About _fastlane_ -_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools). +_fastlane_ is the easiest way to automate beta deployments and releases for your +iOS and Android apps. To learn more, check out [fastlane.tools][14]. + +[1]: https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg +[2]: https://rubygems.org/gems/fastlane-plugin-lizard +[3]: https://badge.fury.io/rb/fastlane-plugin-lizard.svg +[4]: https://badge.fury.io/rb/fastlane-plugin-lizard +[5]: https://circleci.com/gh/liaogz82/fastlane-plugin-lizard.svg?style=svg&circle-token=6d2bc552098ad6c8955ddecc9b058827e91e25cf +[6]: https://circleci.com/gh/liaogz82/fastlane-plugin-lizard +[7]: https://codecov.io/gh/liaogz82/fastlane-plugin-lizard/branch/master/graph/badge.svg +[8]: https://codecov.io/gh/liaogz82/fastlane-plugin-lizard +[9]: https://github.com/fastlane/fastlane +[10]: https://github.com/terryyin/lizard +[11]: https://camo.githubusercontent.com/bf0171b40f72483bc67dd4352db1d37c90a541c1/687474703a2f2f7777772e6c697a6172642e77732f776562736974652f7374617469632f696d672f6c6f676f2d736d616c6c2e706e67 +[12]: https://docs.fastlane.tools/plugins/plugins-troubleshooting/ +[13]: https://docs.fastlane.tools/plugins/create-plugin/ +[14]: https://fastlane.tools +[15]: https://github.com/Backelite/sonar-swift