A tool to enforce Swift style and conventions.
Patterns to include in reports.
Note: The input patterns are not applied when running SwiftLint therefore the files excluded by the patterns are always processed and you may even see logs related to the excluded files in the job console, but Inspecode eventually ignores any issues detected on the excluded files when generating job reports.
Patterns to exclude from reports.
Note: The ignore patterns are not applied when running SwiftLint as same as
Amount of CPU. The default machine has
0.5 CPU with
1920 MiB RAM.
Below is the list of options that are supported:
[--config (string)] the path to SwiftLint's configuration file [--lenient] downgrades serious violations to warnings, warning threshold is disabled [--force-exclude] exclude files in config `excluded` even if their paths are explicitly specified [--enable-all-rules] run all rules, even opt-in and disabled ones, ignoring `whitelist_rules` [--format] should reformat the Swift files
No tool specific severity levels are available.
Note: The incremental analysis is not supported for SwiftLint as of now.
With default options:
inspecode: swiftlint: default
With custom machine:
inspecode: swiftlint: machine: cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
With custom options:
inspecode: swiftlint: options: --lenient:
With a configuration file:
inspecode: swiftlint: config-file: .swiftlint.yml
The above configuration is equivalent to:
inspecode: swiftlint: options: --config: .swiftlint.yml
If no configuration files are specified via
options field, Inspecode first lets SwiftLint to find configuration files in your repository.
See https://github.com/realm/SwiftLint#configuration about how SwiftLint looks for configuration files.
In addition, if SwiftLint cannot find any configuration files, Inspecode also walks the file tree in lexical order in your repository to find a configuration file named
.swiftlint.yml and specifies the file first found to SwiftLint automatically via
Note: Inspecode ignores specific configuration files while searching. See Configuration > Tool Configuration > Field:
If the configuration file detected by Inspecode is not the one you want to use or you do not want to use any configuration files, you can disable Inspecode from detecting configuration files by explicitly setting an empty string to
config-file field like below:
inspecode: swiftlint: config-file: ""