Skip to content

Commit e802c36

Browse files
committed
fix: use environment variable in Plugin.
1 parent e09077c commit e802c36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Plugins/SwiftComplexityPlugin/Plugin.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ struct SwiftComplexityPlugin: BuildToolPlugin {
7373
"--format", "xcode", // Use Xcode diagnostics format
7474
]
7575

76-
// Add threshold from build settings or default
77-
let threshold = "10" // Could be extracted from Xcode build settings if needed
76+
// Add threshold from Xcode build settings or default
77+
let threshold = context.buildEnvironment["SWIFT_COMPLEXITY_THRESHOLD"] ?? "10"
7878
arguments.append(contentsOf: ["--threshold", threshold])
7979

8080
// Add input file paths

0 commit comments

Comments
 (0)