Search code examples
swiftlint

Disable SwiftLint for XCode autogenerated Siri Intents swift files


How to disable SwiftLint for XCode autogenerated *.swift files? For example for Siri Intents?

Errors and Warnings in XCode


Solution

  • You can specify folders and files in the excluded section of the .swiftlint.yml file as discussed in the documentation.

    E.g., you might have an excluded section like so:

    excluded: # paths to ignore during linting. Takes precedence over `included`.
      - Carthage
      - Pods
      - Source/ExcludedFolder
      - Source/ExcludedFile.swift
      - Source/*/ExcludedFile.swift # Exclude files with a wildcard