config_version = "0" exclude_patterns = [ "**/vendor/**", "**/node_modules/**", "**/testdata/**", "**/dist/**", "**/.build/**", "**/build/**", "**/*.min.*", "**/generated/**", ".claude/**", "**/Pods/**", ] test_patterns = [ "**/test/**", "**/tests/**", "**/Tests/**", "**/*_test.*", "**/test_*.*", "**/*.test.*", "**/*Tests.swift", "e2e/**", ] [[source]] name = "default" default = true [[plugin]] name = "osv-scanner" [[plugin]] name = "trufflehog" # 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 # Exhaustive switch-over-enum lookup tables share shape but not content. [language.swift.smells.duplication] # The widget extension is its own target with its own decodeDateString; each paging view model # owns its cursor state in loadMore...IfNeeded; calls to the shared load-state views differ only in # their arguments. filter_patterns = [ "(import_declaration _)", "(switch_statement _)", "(function_declaration name: (simple_identifier) @_n (#eq? @_n \"decodeDateString\"))", "(function_declaration name: (simple_identifier) @_n (#match? @_n \"^loadMore[A-Za-z]*IfNeeded$\"))", "(call_expression (simple_identifier) @_n (#match? @_n \"^(SearchableListState|SRHTLoadStateView)$\"))", ] # 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