A command-line tool and Xcode Extension for formatting Swift code
This report summarizes scanner evidence for nicklockwood/SwiftFormat, a Swift project with 8,950 GitHub stars. SynthScan examined 234,029 lines of code across 681 source files, recording 195 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 1.0 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 166 finding(s).
Are imports declared and package/API names verified? 18 finding(s).
Are wrappers, guards, and repeated structures necessary? 12 finding(s).
Which changes need focused human review? 195 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 195 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Snapshots/Macros/Macros.swift | 121 | COMMENT | |
| LOW | Snapshots/Macros/Macros.swift | 141 | /// struct ShippingOptions { | COMMENT |
| LOW | Snapshots/Euclid/Sources/Mesh.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Mesh.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/Utilities.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Utilities.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/Bounds.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Bounds.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/Transforms.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Transforms.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/Paths.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Paths.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/Vector.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Vector.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/Euclid.h | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Plane.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Plane.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/Polygon.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Polygon.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/Shapes.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Shapes.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/Shapes.swift | 321 | material: material | COMMENT |
| LOW | Snapshots/Euclid/Sources/SceneKit.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/SceneKit.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/CSG.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/CSG.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Euclid/Sources/CSG.swift | 61 | } | COMMENT |
| LOW | Snapshots/Euclid/Sources/CSG.swift | 81 | ap = BSPNode(mesh.polygons).clip(ap, .greaterThan, false) | COMMENT |
| LOW | Snapshots/Euclid/Sources/CSG.swift | 121 | COMMENT | |
| LOW | Snapshots/Euclid/Sources/Vertex.swift | 1 | // | COMMENT |
| LOW | Snapshots/Euclid/Sources/Vertex.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Sprinter/Sources/Sprinter.swift | 1 | // | COMMENT |
| LOW | Snapshots/Sprinter/Sources/Sprinter.swift | 21 | // | COMMENT |
| LOW | Snapshots/Expression/Tests/AnyExpressionTests.swift | 1 | // | COMMENT |
| LOW | Snapshots/Expression/Tests/AnyExpressionTests.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Expression/Tests/ExpressionTests.swift | 1 | // | COMMENT |
| LOW | Snapshots/Expression/Tests/ExpressionTests.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | …ts/Expression/Examples/Calculator/ViewController.swift | 1 | // | COMMENT |
| LOW | …shots/Expression/Examples/Calculator/AppDelegate.swift | 1 | // | COMMENT |
| LOW | …shots/Expression/Examples/Calculator/AppDelegate.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | …pshots/Expression/Examples/Layout/ViewController.swift | 1 | // | COMMENT |
| LOW | Snapshots/Expression/Examples/Layout/View+Layout.swift | 1 | // | COMMENT |
| LOW | Snapshots/Expression/Examples/Layout/AppDelegate.swift | 1 | // | COMMENT |
| LOW | Snapshots/Expression/Examples/Layout/AppDelegate.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Expression/Benchmarks/PerformanceTests.swift | 1 | // | COMMENT |
| LOW | Snapshots/Expression/Benchmarks/PerformanceTests.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Expression/Sources/Expression.swift | 1 | // | COMMENT |
| LOW | Snapshots/Expression/Sources/Expression.swift | 21 | // | COMMENT |
| LOW | Snapshots/Expression/Sources/AnyExpression.swift | 1 | // | COMMENT |
| LOW | Snapshots/Expression/Sources/AnyExpression.swift | 21 | // | COMMENT |
| LOW | Snapshots/Consumer/Tests/CompilerTests.swift | 1 | // | COMMENT |
| LOW | Snapshots/Consumer/Tests/ConsumerTests.swift | 1 | // | COMMENT |
| LOW | Snapshots/Consumer/Tests/ConsumerTests.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Consumer/Tests/PerformanceTests.swift | 1 | // | COMMENT |
| LOW | Snapshots/Consumer/Tests/PerformanceTests.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Consumer/Sources/Consumer.swift | 1 | // | COMMENT |
| LOW | Snapshots/Consumer/Sources/Consumer.swift | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Consumer/Sources/Consumer.h | 1 | // | COMMENT |
| LOW | Snapshots/Consumer/Sources/Consumer.h | 21 | // copies or substantial portions of the Software. | COMMENT |
| LOW | Snapshots/Consumer/Sources/ConsumerCompiler.swift | 1 | // | COMMENT |
| 97 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | Tests/ParsingHelpersTests.swift | 0 | var foo: int { get { return 5 } set { _foo = newvalue } } | STRING |
| HIGH | Tests/Rules/WrapPropertyBodiesTests.swift | 0 | var foo: int { get { return 5 } set { _foo = newvalue } } | STRING |
| HIGH | Tests/Rules/RedundantReturnTests.swift | 0 | var foo: int { get { return 5 } set { _foo = newvalue } } | STRING |
| HIGH | Tests/Rules/PreferForLoopTests.swift | 0 | for unsafe child in unsafe children { print(child) } | STRING |
| HIGH | Tests/Rules/RedundantParensTests.swift | 0 | for unsafe child in unsafe children { print(child) } | STRING |
| HIGH | Tests/Rules/IndentTests.swift | 0 | for unsafe child in unsafe children { print(child) } | STRING |
| HIGH | Tests/Rules/TestSuiteAccessControlTests.swift | 0 | import testing struct myfeaturetests { func featureworks() { #expect(true) } } | STRING |
| HIGH | Tests/Rules/ValidateTestCasesTests.swift | 0 | import testing struct myfeaturetests { func featureworks() { #expect(true) } } | STRING |
| HIGH | Tests/Rules/UnusedPrivateDeclarationsTests.swift | 0 | import testing struct myfeaturetests { func featureworks() { #expect(true) } } | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Snapshots/Layout/README.md | 2692 | text="Lorem ipsum sit dolor " | CODE |
| LOW | Snapshots/Layout/Benchmark/ViewController.swift | 85 | "text": "{i}. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidid | CODE |
| LOW | Snapshots/Layout/Benchmark/ViewController.swift | 85 | "text": "{i}. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incidid | CODE |
| LOW | Snapshots/Layout/Benchmark/ViewController.swift | 158 | label.text = "\(i). Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut | CODE |
| LOW | Snapshots/Layout/Benchmark/ViewController.swift | 158 | label.text = "\(i). Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut | CODE |
| LOW | …apshots/Layout/PerformanceTests/PerformanceTests.swift | 29 | "text": "\(i). Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor in | CODE |
| LOW | …apshots/Layout/PerformanceTests/PerformanceTests.swift | 29 | "text": "\(i). Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor in | CODE |
| LOW | …apshots/Layout/PerformanceTests/PerformanceTests.swift | 90 | label.text = "\(i). Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididun | CODE |
| LOW | …apshots/Layout/PerformanceTests/PerformanceTests.swift | 90 | label.text = "\(i). Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididun | CODE |
| LOW | …apshots/Layout/PerformanceTests/PerformanceTests.swift | 166 | "text": "{i}. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor inc | CODE |
| LOW | …apshots/Layout/PerformanceTests/PerformanceTests.swift | 166 | "text": "{i}. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor inc | CODE |
| LOW | …apshots/Layout/PerformanceTests/PerformanceTests.swift | 194 | "attributedText": "{i}. Lorem ipsum dolor sit amet, consectetur <b>adipiscing</b> elit, sed do e | CODE |
| LOW | …apshots/Layout/PerformanceTests/PerformanceTests.swift | 194 | "attributedText": "{i}. Lorem ipsum dolor sit amet, consectetur <b>adipiscing</b> elit, sed do e | CODE |
| LOW | Snapshots/Layout/UIDesigner/EditViewController.swift | 89 | "placeholder": "Class", | CODE |
| LOW | Snapshots/Layout/UIDesigner/EditViewController.swift | 168 | "placeholder": name, | CODE |
| LOW | Snapshots/Sprinter/Tests/PerformanceTests.swift | 14 | let simpleFormat = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque finibus malesuada eros, at tincidun | CODE |
| LOW | Snapshots/Sprinter/Tests/PerformanceTests.swift | 14 | let simpleFormat = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque finibus malesuada eros, at tincidun | CODE |
| LOW | Snapshots/Expression/README.md | 330 | let expressionString = "lorem ipsum {foo + bar} dolor sit" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Snapshots/Expression/README.md | 177 | print("Error: \(error)") | CODE |
| MEDIUM | Snapshots/Issues/1061.swift | 20 | print("Error handled") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Sources/CommandLine.swift | 1072 | // TODO: need a more robust solution | STRING |
| MEDIUM | Sources/Rules/SpaceAroundOperators.swift | 123 | // TODO: make this check more robust, and remove redundant space | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Rules.md | 949 | - /// TODO: implement Foo.bar() algorithm | CODE |
| LOW | Rules.md | 950 | + // TODO: implement Foo.bar() algorithm | CODE |
| LOW | Sources/Rules/DocComments.swift | 126 | - /// TODO: implement Foo.bar() algorithm | STRING |
| LOW | Sources/Rules/DocComments.swift | 127 | + // TODO: implement Foo.bar() algorithm | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | Scripts/prepare_release.sh | 25 | # Create a temporary file for the new changelog content | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | Scripts/prepare_release.sh | 5 | # Check if version argument is provided | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | site/site_content.rb | 261 | def strip_badges_and_local_images(lines) | CODE |