Sider Documentation

Sider Documentation

  • Enterprise
  • News
  • Sider Top

›Swift

Getting Started

  • Home
  • Intro Videos
  • Setting up Sider
  • Dashboard Overview
  • Repository Settings
  • Custom Analysis Configuration
  • Recommended Ruleset
  • Working with Issues
  • Permissions
  • Skip Analyzing

Analysis Tools

    Ruby

    • RuboCop
    • Reek
    • Querly
    • Rails Best Practices
    • Brakeman
    • HAML-Lint
    • Slim-Lint (beta)

    Java

    • Checkstyle
    • PMD
    • JavaSee

    Kotlin

    • ktlint (beta)
    • detekt (beta)

    JavaScript and Flavors

    • ESLint
    • JSHint
    • TyScan
    • CoffeeLint
    • TSLint (deprecated)

    CSS

    • stylelint
    • SCSS-Lint (deprecated)

    PHP

    • PHP_CodeSniffer
    • PHPMD
    • Phinder

    Python

    • Flake8
    • Pylint (beta)

    Swift

    • SwiftLint

    Go

    • GolangCI-Lint

    C/C++

    • Cppcheck
    • cpplint
    • Clang-Tidy (beta)

    C#

    • FxCop (beta)

    Shell script

    • ShellCheck

    Dockerfile

    • hadolint

    Markdown

    • remark-lint

    Others

    • Goodcheck
    • Misspell
    • LanguageTool (beta)
    • PMD CPD (beta)

Custom Rules

  • Intro to Custom Rules
  • Goodcheck
  • Tips & Tricks

Advanced Settings

  • Inline Comments
  • Private Dependencies
  • Restricting access to Close button
  • Transferring a repository

Billing and Plans

  • Billing and Plans

Troubleshooting

  • Troubleshooting

Enterprise

  • Outline
  • System Overview
  • Installation
  • Configuration
  • Operation
  • Update
  • Load Balancer
  • MySQL
  • Redis
  • MinIO
  • Amazon S3
  • GitHub Enterprise Server
  • Clustering
  • Example Deployments

    • Single Node with Docker Compose

    Releases

    • Overview
    • February 2021
    • January 2021
    • December 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • February 2020
    • January 2020
    • November 2019
    • Older releases

News

  • 2021
  • 2020
  • 2019
Edit

SwiftLint

Supported VersionLanguageWebsite
0.42.0Swifthttps://realm.github.io/SwiftLint

SwiftLint is a static analysis tool for Swift. It checks style and conventions, reports code metrics, and so on.

Getting Started

To start using SwiftLint, enable it in your repository settings.

If you want to customize SwiftLint, put a .swiftlint.yml file in your repository.

Configuration

Here is an example configuration via sider.yml:

linter:
  swiftlint:
    path: Source/
    config: lint_yml/.swiftlint.yml
    ignore_warnings: true
    lenient: true
    enable-all-rules: true

You can use several options to fine-tune SwiftLint to your project.

NameTypeDefault
root_dirstring-
pathstring-
configstring-
ignore_warningsbooleanfalse
lenientbooleanfalse
enable-all-rulesbooleanfalse

path

This option allows you to specify a file or directory to analyze.

This also allows you to specify a special format "@path/to/file" (prefixed with @). You can create a file which contains a list of file names to be analyzed and pass it to the analyzer with this option.

For example, when you have the file config/swiftlint_target.txt with the following content,

test1.swift
test2.swift
foo/test3.swift

then sider.yml should be below:

linter:
  swiftlint:
    path: "@config/swiftlint_target.txt"

Note that the file path should be relative to the root directory where the sider.yml is located or the root_dir directory if it is specified.

config

This option allows you to specify a SwiftLint configuration file you want. If omitted, the SwiftLint's default one is used.

ignore_warnings

This option allows you to ignore warning issues.

lenient

This option allows you to downgrade serious violations to warnings.

enable-all-rules

This option allows you to enable all the rules, even opt-in and disabled ones.

← Pylint (beta)GolangCI-Lint →
  • Getting Started
  • Configuration
    • path
    • config
    • ignore_warnings
    • lenient
    • enable-all-rules
Sider Documentation
Docs
Getting StartedAnalysis ToolsEnterprise
Sider
Sider TopTerms of ServicePrivacy
Social
BlogGitHubStar
Copyright © 2021 Sider, Inc.