{"id":894,"url":"https://github.com/yopeso/Taylor","last_synced_at":"2025-07-30T19:33:11.890Z","repository":{"id":65239059,"uuid":"46943782","full_name":"yopeso/Taylor","owner":"yopeso","description":"Measure Swift code metrics and get reports in Xcode, Jenkins and other CI platforms.","archived":false,"fork":false,"pushed_at":"2019-06-11T18:49:47.000Z","size":51011,"stargazers_count":307,"open_issues_count":4,"forks_count":18,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-14T14:05:13.794Z","etag":null,"topics":["code-metrics","code-quality","metrics","sourcekitten","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yopeso.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-26T19:30:46.000Z","updated_at":"2024-08-12T19:20:19.000Z","dependencies_parsed_at":"2023-01-16T15:00:55.457Z","dependency_job_id":null,"html_url":"https://github.com/yopeso/Taylor","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yopeso%2FTaylor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yopeso%2FTaylor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yopeso%2FTaylor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yopeso%2FTaylor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yopeso","download_url":"https://codeload.github.com/yopeso/Taylor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228179032,"owners_count":17881126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-metrics","code-quality","metrics","sourcekitten","swift"],"created_at":"2024-01-05T20:15:34.095Z","updated_at":"2024-12-04T19:32:25.230Z","avatar_url":"https://github.com/yopeso.png","language":"Swift","readme":"![](Assets/logo.png)\n\n# Taylor\n\n⚠️ **Taylor is DEPRECATED. Use [SwiftLint](https://github.com/realm/SwiftLint) instead.**\n\nA tool aimed to increase Swift code quality, by checking for conformance to code metrics.\n\n[![Build Status](https://travis-ci.org/yopeso/Taylor.svg?branch=master)](https://travis-ci.org/yopeso/Taylor)\n[![codecov.io](https://codecov.io/github/yopeso/Taylor/coverage.svg?branch=master)](https://codecov.io/github/yopeso/Taylor?branch=master)\n[![Release version](https://img.shields.io/badge/release-0.2.3-blue.svg)](https://github.com/yopeso/Taylor/releases/tag/0.2.3)\n[![Swift Code](https://img.shields.io/badge/language-swift-orange.svg)](https://github.com/yopeso/Taylor)\n[![Platform](https://img.shields.io/badge/platform-osx-yellow.svg)](https://github.com/yopeso/Taylor)\n[![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/yopeso/Taylor/blob/master/LICENSE)\n\nTaylor uses [SourceKitten](https://github.com/S2dentik/SourceKitten) to a more\naccurate [AST](http://clang.llvm.org/docs/IntroductionToTheClangAST.html)\nrepresentation and generates the final report in either **Xcode, JSON, PMD** or **plain text** formats.\n\n## Installation\n\n### Homebrew (recommended)\nYou need to have [Homebrew](http://brew.sh) installed.\n```shell\nbrew update\nbrew install taylor\n```\n### Source\nRebuild dependencies by running `carthage bootstrap --platform Mac` ([Carthage](https://github.com/Carthage/Carthage) required)  \nClone the project and run `make install` (**latest version of Xcode required**).\n\n### Package\nDownload the latest [release](https://github.com/yopeso/Taylor/releases) and run:\n```shell\nTaylor.app/Contents/Resources/install\n```\n\n## Usage\n\n### Xcode\n\nTo get warnings displayed in the IDE add a new **Run Script Phase** with:\n\n```bash\nif which taylor \u003e/dev/null; then\n  taylor -p ${PROJECT_DIR} -r xcode\nelse\n  echo \"Taylor not installed\"\nfi\n```\n![](Assets/runscriptphase.png)\n\n### Command line \n\nTo use Taylor from command line run it as follows:\n\n`taylor [option1 [option1_argument]] [option2 option2_argument] […]`\n\n##### Available options\n\n|`taylor`           |Description|\n|----------------|-------------------|\n|`-h`/`--help`| Print **help**.|\n|`-v`/`--version`| Print Taylor **version**.|\n|`-p`/`--path` `path`| **Path** to the folder to be analysed (current folder by default).|\n|`-e`/`--exclude` `file`| Path to either **directory or file to be excluded** from analysis.|\n|`-ef`/`--excludeFile` `file`| Path to **exclude file** in `.yml` format.|\n|`-f`/`--file` `file`| File to be **included** in analysis (may be from an external source).|\n|`-t`/`--type` `type`| **Type of files** to be analysed.|\n|`-vl`/`--verbosityLevel` `level`| **Verbosity level** for output messages (info, warning and error).|\n|`-r`/`--reporter` `type:name`| Type of final report (**json, xcode, pmd** or **plain text**) and filename.|\n|`-rc`/`--ruleCustomization` `rule=value`| **Customize rules** by giving custom values. See [help](/Resources/Help.txt) for more details.|\n\n`taylor` alone with **no arguments** analyses `.swift` files inside current folder.\n\n\n### Excludes\n\nIf you want to exclude some files or folders from checking create a new `.yml` file and call Taylor with\n`-ef /path/to/file` argument.  \nDefault filename is `excludes.yml` and its default location is the folder\nspecified by `--path` flag.  \nThe following excluding name formats can be specified:\n\n```yaml\n- \"/path/to/file\"\n- \"file\"\n- \"Folder\"\n- \"Folder/*\"\n- \".*Tests.*\"\n```\n\n\n### Rules\n\nThese are the code quality rules currently existing:\n\n#### Excessive Class Length\n\n[Number of lines in a class](\"http://phpmd.org/rules/codesize.html#excessiveclasslength\") must not exceed given limit. Default limit = `400 lines`.  \nExample: `taylor -rc ExcessiveClassLength=100`.\n\n#### Excessive Method Length\n\n[Number of lines in a method](\"http://phpmd.org/rules/codesize.html#excessivemethodlength\") must not exceed given limit. Default limit = `20 lines`.  \nExample: `taylor -rc ExcessiveMethodLength=10`.\n\n#### Too Many Methods\n\n[Number of methods in a class](\"http://phpmd.org/rules/codesize.html#toomanymethods\") must not exceed given limit. Default limit = `10 methods`.  \nExample: `taylor -rc TooManyMethods=7`.\n\n#### Cyclomatic Complexity\n\n[Cyclomatic Complexity](http://phpmd.org/rules/codesize.html#cyclomaticcomplexity) number of a method must not exceed maximal admitted value. Default = `5`.  \nExample: `taylor -rc CyclomaticComplexity=10`.\n\n#### Nested Block Depth\n\n[Block Depth](http://docs.oclint.org/en/dev/rules/size.html#nestedblockdepth) of a method must not exceed maximal admitted value. Default = `3`.  \nExample: `taylor -rc NestedBlockDepth=7`.\n\n#### N-Path Complexity\n\n[N-Path Complexity](http://phpmd.org/rules/codesize.html#npathcomplexity) of a method must not exceed maximal admitted value. Default = `100`.  \nExample: `taylor -rc NPathComplexity=50`.\n\n#### Excessive Parameter List\n\n[Number of parameters](http://phpmd.org/rules/codesize.html#excessiveparameterlist) given to a method must not exceed maximal admitted value. Default = `3`.  \nExample: `taylor -rc ExcessiveParameterList=5`.\n\n## Credits\n\nThanks to [JP Simard](https://github.com/jpsim) for developing [SourceKitten](https://github.com/jpsim/SourceKitten).\n\n## License\n\nMIT Licensed.\n","funding_links":[],"categories":["Code Quality","技术方向"],"sub_categories":["Linter","Other free courses","iOS"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyopeso%2FTaylor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyopeso%2FTaylor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyopeso%2FTaylor/lists"}