|
| 1 | +# Configuration version for compatibility with the tool |
| 2 | +config_version = "0" |
| 3 | + |
| 4 | +# Glob patterns to exclude from analysis (e.g., build artifacts and dependencies) |
| 5 | +exclude_patterns = [ |
| 6 | + "scripts/**", |
| 7 | + ".github/**", |
| 8 | + "test/**", |
| 9 | + "**/*_test.go" |
| 10 | +] |
| 11 | + |
| 12 | +# Glob patterns to identify test files |
| 13 | +test_patterns = [ |
| 14 | + "**/*_test.go" # Match go test files |
| 15 | +] |
| 16 | + |
| 17 | +# === Smells Configuration === |
| 18 | +# Controls how detected code smells are reported |
| 19 | +[smells] |
| 20 | +mode = "comment" # Adds comments in code or PRs to report smells |
| 21 | + |
| 22 | +# === Source Configuration === |
| 23 | +# Defines a code source for analysis |
| 24 | +[[source]] |
| 25 | +name = "default" # Name of the source |
| 26 | +default = true # Marks this as the default source to scan |
| 27 | + |
| 28 | +# === Individual Code Smell Toggles === |
| 29 | +# Enables or disables detection of specific code smells |
| 30 | + |
| 31 | +[smells.similar_code] |
| 32 | +enabled = true # Detects similar (but not identical) code blocks |
| 33 | + |
| 34 | +[smells.duplication] |
| 35 | +enabled = true # Detects duplication of code blocks |
| 36 | + |
| 37 | +[smells.identical_code] |
| 38 | +enabled = true # Detects exact duplicate code blocks |
| 39 | + |
| 40 | +[smells.function_parameters] |
| 41 | +enabled = false # Flags functions with too many parameters |
| 42 | + |
| 43 | +[smells.nested_control_flow] |
| 44 | +enabled = false # Would flag deeply nested control flow (e.g., many if/else) |
| 45 | + |
| 46 | +[smells.file_complexity] |
| 47 | +enabled = false # Would flag files with high overall complexity |
| 48 | + |
| 49 | +[smells.function_complexity] |
| 50 | +enabled = false # Would flag individual functions that are too complex |
| 51 | + |
| 52 | +[smells.return_statements] |
| 53 | +enabled = false # Would flag functions with multiple return paths |
| 54 | + |
| 55 | +[smells.boolean_logic] |
| 56 | +enabled = false # Detects overly complex or nested boolean logic |
| 57 | + |
| 58 | +# === Plugins Section === |
| 59 | +# Each plugin performs a specific type of analysis or linting |
| 60 | + |
| 61 | +[[plugin]] |
| 62 | +name = "actionlint" # Validates GitHub Actions workflows |
| 63 | + |
| 64 | +[[plugin]] |
| 65 | +name = "osv-scanner" # Scans for known vulnerabilities using OSV database |
| 66 | + |
| 67 | +[[plugin]] |
| 68 | +name = "ripgrep" # Fast searching for pattern matching in codebase |
| 69 | + |
| 70 | +[[plugin]] |
| 71 | +name = "trivy" # Scans for vulnerabilities in containers and dependencies |
| 72 | + |
| 73 | +[[plugin]] |
| 74 | +name = "trufflehog" # Detects secrets and sensitive data in code |
0 commit comments