Tailor is a static analysis and lint tool for Swift code that analyzes code for consistent styling and bugs. It runs on Windows, MacOS, and Linux. Tailor checks code against rules for naming conventions, whitespace, line lengths, and other code quality issues. Results can be viewed directly in Xcode. Tailor can also be integrated to run as part of the Xcode build process or via Fastlane.
2. What it is?
Tailor is a cross-platform static
analysis and lint tool for source code
written in Apple's Swift programming
language. It analyzes your code to
ensure consistent styling and help
avoid bugs.
6. Rules
●[upper-camel-case] UpperCamelCase naming
●[lower-camel-case] lowerCamelCase naming
●[constant-naming] Constant naming
●[constant-k-prefix] Flag "k-prefixed" constants
●[arrow-whitespace] Flag arrows that are not space delimited
●[angle-bracket-whitespace] Check whitespace in and around angular brackets
●[colon-whitespace] Flag incorrect whitespace around colons
●[comma-whitespace] Flag commas that are not left associated
●[operator-whitespace] Flag operators that are not space delimited (only in operator declarations)
●[leading-whitespace] Flag leading whitespace in a file
●[parentheses-whitespace] Check whitespace in and around parenthesis
●[terminating-newline] Single newline at end of source file
●[trailing-whitespace] Flag trailing whitespace
●[comment-whitespace] Comment whitespace checks
●[function-whitespace] Blank lines around functions
Naming Whitespace
7. Rules
●Restrict number of lines per file and construct body
○[max-class-length]
○[max-closure-length]
○[max-file-length]
○[max-function-length]
○[max-struct-length]
●Restrict number of characters per line and construct name
○[max-line-length]
○[max-name-length]
○[min-name-length]
●[redundant-parentheses] Flag redundant parentheses
●[brace-style] One true brace style
●[forced-type-cast] Flag force casts
●[multiple-imports] One import per line
●[terminating-semicolon] Flag semicolon terminated statements
●[todo-syntax] Verify TODO syntax
●[redundant-optional-binding] Flag redundant let/var bindings in optional binding lists
●[trailing-closure] Closures that are the last argument of a function should be passed using 'trailing closure' syntax.
Length Others