g-cqd/SwiftStaticAnalysis (swa)
Run swa on a Swift codebase to find unused code and duplicates, with SARIF output.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit May 17, 2026
- License
- MIT
Pinned Snippet
uses: g-cqd/swiftstaticanalysis@7d529660c192dc331187468ae7ac79aa8d0e63c5 # v0.1.2tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| path | Path to scan (directory or file). | no | . |
| mode | Unused-code detection mode (reachability, simple, indexStore). | no | reachability |
| clone-types | Comma-separated clone types to detect (exact, near, semantic). | no | exact,near |
| min-tokens | Minimum tokens for a duplicate clone group. | no | 50 |
| format | Output format (sarif, text, json, xcode). `sarif` is post-processed from JSON. | no | sarif |
| fail-on | Severity threshold to fail the step (error, warning, never). Implemented in-action; swa itself has no fail-on flag. | no | error |
| swa-version | Optional git ref to check out before building (tag, branch, or SHA). When empty, uses the workspace as-is. | no | "" |
| working-directory | Working directory in which to invoke swa. | no | ${{ github.workspace }} |
Outputs
| name | description |
|---|---|
| unused-count | Number of unused-code findings reported by swa. |
| duplicates-count | Number of duplicate clone groups reported by swa. |
| sarif-path | Path to the generated SARIF file (only when format=sarif). |