config_version = "0" exclude_patterns = [ "**/.build/**", ".claude/**", # Vendored tree-sitter grammars and scanners (THIRD_PARTY.org). "Sources/TreeSitterClojure/**", "Sources/TreeSitterElisp/**", "Sources/TreeSitterScanners/**", ] test_patterns = [ "Tests/**", ] [smells] mode = "comment" # Early returns are guard clauses, which keep the happy path unindented. [smells.return_statements] enabled = false # Function and file complexity are left to review rather than counted. [smells.function_complexity] enabled = false [smells.file_complexity] enabled = false [[source]] name = "default" default = true [[plugin]] name = "swiftlint" [[plugin]] name = "shellcheck" [[plugin]] name = "trufflehog" # Style rules that flag most of the codebase without finding defects. [[triage]] match.plugins = ["swiftlint"] match.rules = [ "swiftlint:line_length", "swiftlint:identifier_name", "swiftlint:trailing_comma", "swiftlint:todo", ] match.file_patterns = ["**"] set.ignored = true # Tests use try! to fail fast. [[triage]] match.plugins = ["swiftlint"] match.rules = ["swiftlint:force_try"] match.file_patterns = ["Tests/**"] set.ignored = true # Exhaustive switch-over-enum lookup tables and the light and dark color tables share shape but not content. # FolderEntity is declared in each app target because App Intents reads its metadata from the target # that declares it; prettify draws through UIKit on iOS and AppKit on the Mac. [language.swift.smells.duplication] filter_patterns = [ "(import_declaration _)", "(switch_statement _)", "(dictionary_literal _)", "(class_declaration name: (type_identifier) @_n (#eq? @_n \"FolderEntity\"))", "(function_declaration name: (simple_identifier) @_n (#eq? @_n \"prettify\"))", ] # tree-sitter-swift nests each `else if` inside the previous branch, so a one-line `if` in the # fourth branch of a flat chain reports level 5. [language.swift.smells.nested_control_flow] enabled = false