Format Rust code
This report summarizes scanner evidence for rust-lang/rustfmt, a Rust project with 6,987 GitHub stars. SynthScan examined 109,929 lines of code across 2118 source files, recording 558 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 8.0 (Moderate 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.
Can maintainers explain intent, assumptions, and trade-offs? 307 finding(s).
Are imports declared and package/API names verified? 241 finding(s).
Are wrappers, guards, and repeated structures necessary? 10 finding(s).
Which changes need focused human review? 558 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 558 distinct pattern matches across 6 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⚡ | Configurations.md | 438 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit. | COMMENT |
| LOW⚡ | Configurations.md | 438 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit. | COMMENT |
| LOW⚡ | Configurations.md | 443 | // Lorem ipsum dolor sit amet, | COMMENT |
| LOW⚡ | Configurations.md | 443 | // Lorem ipsum dolor sit amet, | COMMENT |
| LOW⚡ | Configurations.md | 3312 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, | COMMENT |
| LOW⚡ | Configurations.md | 3312 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, | COMMENT |
| LOW⚡ | Configurations.md | 3318 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna a | COMMENT |
| LOW⚡ | Configurations.md | 3318 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna a | COMMENT |
| LOW⚡ | Configurations.md | 3320 | // Information on the lorem ipsum can be found at the following url: https://en.wikipedia.org/wiki/Lorem_ipsum. Its text | COMMENT |
| LOW⚡ | Configurations.md | 3320 | // Information on the lorem ipsum can be found at the following url: https://en.wikipedia.org/wiki/Lorem_ipsum. Its text | COMMENT |
| LOW⚡ | Configurations.md | 3329 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, | COMMENT |
| LOW⚡ | Configurations.md | 3329 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, | COMMENT |
| LOW⚡ | Configurations.md | 3335 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, | COMMENT |
| LOW⚡ | Configurations.md | 3335 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit, | COMMENT |
| LOW⚡ | Configurations.md | 3341 | // Information on the lorem ipsum can be found at the following url: https://en.wikipedia.org/wiki/Lorem_ipsum. Its text | COMMENT |
| LOW⚡ | Configurations.md | 3341 | // Information on the lorem ipsum can be found at the following url: https://en.wikipedia.org/wiki/Lorem_ipsum. Its text | COMMENT |
| LOW⚡ | Configurations.md | 1221 | let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit amet consectetur adipiscing"; | CODE |
| LOW⚡ | Configurations.md | 1221 | let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit amet consectetur adipiscing"; | CODE |
| LOW⚡ | Configurations.md | 1229 | let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit amet \ | CODE |
| LOW⚡ | Configurations.md | 1229 | let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit amet \ | CODE |
| LOW | Configurations.md | 2125 | // Lorem ipsum: | COMMENT |
| LOW | Configurations.md | 2135 | // Lorem ipsum: | COMMENT |
| LOW⚡ | tests/target/comment4.rs | 11 | /* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a | COMMENT |
| LOW⚡ | tests/target/comment4.rs | 11 | /* Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a | COMMENT |
| LOW⚡ | tests/target/comment4.rs | 16 | * libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit | COMMENT |
| LOW | tests/target/struct_lits_visual_multiline.rs | 35 | A { // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | CODE |
| LOW | tests/target/struct_lits_visual_multiline.rs | 35 | A { // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | CODE |
| LOW⚡ | tests/target/comment5.rs | 5 | //@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec adiam lectus. | COMMENT |
| LOW⚡ | tests/target/comment5.rs | 5 | //@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec adiam lectus. | COMMENT |
| LOW⚡ | tests/target/comment5.rs | 12 | //@@@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec adiam | COMMENT |
| LOW⚡ | tests/target/comment5.rs | 12 | //@@@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec adiam | COMMENT |
| LOW⚡ | tests/target/comment.rs | 6 | //! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam | COMMENT |
| LOW⚡ | tests/target/comment.rs | 6 | //! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam | COMMENT |
| LOW⚡ | tests/target/comment.rs | 15 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a | COMMENT |
| LOW⚡ | tests/target/comment.rs | 15 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a | COMMENT |
| LOW⚡ | tests/target/comment.rs | 20 | // libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit | COMMENT |
| LOW | tests/target/struct_tuple_visual.rs | 22 | A(// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | CODE |
| LOW | tests/target/struct_tuple_visual.rs | 22 | A(// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | CODE |
| LOW | tests/target/issue-4210-disabled.rs | 14 | /// | long val | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et | COMMENT |
| LOW | tests/target/issue-4210-disabled.rs | 14 | /// | long val | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et | COMMENT |
| LOW⚡ | tests/target/issue-4079.rs | 4 | * Lorem ipsum dolor sit amet, consectetur adipiscing elit. In lacinia | COMMENT |
| LOW⚡ | tests/target/issue-4079.rs | 4 | * Lorem ipsum dolor sit amet, consectetur adipiscing elit. In lacinia | COMMENT |
| LOW⚡ | tests/target/issue-4079.rs | 9 | /*! Lorem ipsum dolor sit amet, consectetur adipiscing elit. In lacinia | COMMENT |
| LOW⚡ | tests/target/issue-4079.rs | 9 | /*! Lorem ipsum dolor sit amet, consectetur adipiscing elit. In lacinia | COMMENT |
| LOW | tests/target/struct_lits_visual.rs | 35 | A { // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | CODE |
| LOW | tests/target/struct_lits_visual.rs | 35 | A { // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | CODE |
| LOW | tests/target/struct_lits.rs | 42 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | COMMENT |
| LOW | tests/target/struct_lits.rs | 42 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | COMMENT |
| LOW | tests/target/struct_lits_multiline.rs | 52 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | COMMENT |
| LOW | tests/target/struct_lits_multiline.rs | 52 | // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit | COMMENT |
| LOW | tests/target/issue-4210.rs | 14 | /// | long val | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et | COMMENT |
| LOW | tests/target/issue-4210.rs | 14 | /// | long val | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et | COMMENT |
| LOW⚡ | tests/target/issue-4791/issue_4928.rs | 21 | /// Lorem ipsum dolor sit amet. | COMMENT |
| LOW⚡ | tests/target/issue-4791/issue_4928.rs | 21 | /// Lorem ipsum dolor sit amet. | COMMENT |
| LOW⚡ | tests/target/issue-4791/issue_4928.rs | 26 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | COMMENT |
| LOW⚡ | tests/target/issue-4791/issue_4928.rs | 26 | /// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | COMMENT |
| LOW | tests/target/itemized-blocks/urls.rs | 19 | //! - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum sem | COMMENT |
| LOW | tests/target/itemized-blocks/urls.rs | 19 | //! - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum sem | COMMENT |
| LOW | tests/target/issue-4036/two.rs | 7 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor \ | CODE |
| LOW | tests/target/issue-4036/two.rs | 7 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor \ | CODE |
| 181 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | triagebot.toml | 101 | # `S-waiting-on-author`, `S-blocked`}. | COMMENT |
| LOW | Configurations.md | 1001 | - **Stable**: No (tracking issue: [#3348](https://github.com/rust-lang/rustfmt/issues/3348)) | COMMENT |
| LOW | Configurations.md | 1021 | fn add_one(x: i32) -> i32 { | COMMENT |
| LOW | Configurations.md | 1801 | // Leading pipes are removed from this: | COMMENT |
| LOW | Configurations.md | 1821 | _ => {} | COMMENT |
| LOW | Configurations.md | 3321 | COMMENT | |
| LOW | config_proc_macro/src/lib.rs | 21 | #[cfg(feature = "debug-with-rustfmt")] | COMMENT |
| LOW | config_proc_macro/src/lib.rs | 41 | pub fn nightly_only_test(_args: TokenStream, input: TokenStream) -> TokenStream { | COMMENT |
| LOW | config_proc_macro/src/attrs.rs | 1 | //! This module provides utilities for handling attributes on variants | COMMENT |
| LOW | tests/target/comment_crlf_newline.rs | 1 | // rustfmt-normalize_comments: true | COMMENT |
| LOW | tests/target/where-clause-comment-wrap-issue-7148.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/issue-2346.rs | 1 | // rustfmt-normalize_comments: true | COMMENT |
| LOW | tests/target/issue-2197.rs | 1 | // rustfmt-max_width: 79 | COMMENT |
| LOW | tests/target/markdown-comment.rs | 1 | // Preserve two trailing whitespaces in doc comment, | COMMENT |
| LOW | tests/target/soft-wrapping.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/issue-3787.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/unsafe_attributes.rs | 1 | // https://github.com/rust-lang/rust/issues/123757 | COMMENT |
| LOW | tests/target/unsafe_attributes.rs | 21 | #![unsafe(simple::path::tt[a b c])] | COMMENT |
| LOW | tests/target/issue-2111.rs | 21 | // ModelRequests, | COMMENT |
| LOW | tests/target/doc-comment-with-example.rs | 1 | // rustfmt-format_code_in_doc_comments: true | COMMENT |
| LOW | tests/target/issue-3751.rs | 1 | // rustfmt-format_code_in_doc_comments: true | COMMENT |
| LOW | tests/target/issue_4573.rs | 1 | // rustmft-version:Two | COMMENT |
| LOW | tests/target/mulit-file.rs | 1 | // Tests that where a single file is referred to in multiple places, we don't | COMMENT |
| LOW | tests/target/issue-4041.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/multiple.rs | 1 | // rustfmt-normalize_comments: true | COMMENT |
| LOW | tests/target/comment5.rs | 1 | // rustfmt-normalize_comments: true | COMMENT |
| LOW | tests/target/issue-2523.rs | 1 | // rustfmt-normalize_comments: true | COMMENT |
| LOW | …doc_attributes_should_not_imply_format_doc_comments.rs | 1 | // rustfmt-normalize_doc_attributes: true | COMMENT |
| LOW | tests/target/comment.rs | 1 | // rustfmt-normalize_comments: true | COMMENT |
| LOW | tests/target/comment.rs | 21 | // amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis | COMMENT |
| LOW | tests/target/issue_5907.rs | 1 | // rustfmt-format_code_in_doc_comments: true | COMMENT |
| LOW | tests/target/issue-5136-3.rs | 1 | // rustfmt-file_lines: [] | COMMENT |
| LOW | tests/target/issue-691.rs | 1 | // rustfmt-normalize_comments: true | COMMENT |
| LOW | tests/target/issue-3105.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/let_else_v2.rs | 21 | COMMENT | |
| LOW | tests/target/issue-3182.rs | 1 | // rustfmt-max_width: 79 | COMMENT |
| LOW | tests/target/issue-6832.rs | 1 | // rustfmt-format_code_in_doc_comments: true | COMMENT |
| LOW | tests/target/let_else.rs | 101 | COMMENT | |
| LOW | tests/target/let_else.rs | 121 | COMMENT | |
| LOW | tests/target/let_else.rs | 181 | // Because the initializer expr is multi-lined the else is placed on it's own line. | COMMENT |
| LOW | tests/target/issue-4210-disabled.rs | 1 | // rustfmt-wrap_comments: false | COMMENT |
| LOW | tests/target/issue-5136-2.rs | 1 | use std; | COMMENT |
| LOW | tests/target/issue-5030.rs | 1 | // rustfmt-imports_granularity: Item | COMMENT |
| LOW | tests/target/issue-5136-5.rs | 1 | // rustfmt-file_lines: [] | COMMENT |
| LOW | tests/target/issue-3224.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/issue-5095.rs | 21 | COMMENT | |
| LOW | tests/target/issue-5023.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/issue-683.rs | 1 | // rustfmt-normalize_comments: true | COMMENT |
| LOW | tests/target/issue-2896.rs | 61 | (item_a, (item_b, num_cooccurrences, row_sum_a, row_sum_b)) | COMMENT |
| LOW | tests/target/issue_4057.rs | 1 | // rustfmt-format_code_in_doc_comments: true | COMMENT |
| LOW | tests/target/issue-2941.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/issue-2520.rs | 1 | // rustfmt-normalize_comments: true | COMMENT |
| LOW | tests/target/issue-5234.rs | 1 | // rustfmt-format_code_in_doc_comments: true | COMMENT |
| LOW | tests/target/issue-5234.rs | 21 | /// ``` | COMMENT |
| LOW | tests/target/issue-5234.rs | 41 | /// ``` | COMMENT |
| LOW | tests/target/issue-3153.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/doc-of-generic-item.rs | 1 | // Non-doc pre-comment of Foo | COMMENT |
| LOW | tests/target/doc-of-generic-item.rs | 21 | /// doc of 'a | COMMENT |
| LOW | tests/target/markdown-comment-with-options.rs | 1 | // rustfmt-wrap_comments: true | COMMENT |
| LOW | tests/target/issue-2401.rs | 1 | // rustfmt-hard_tabs = true | COMMENT |
| 231 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/target/itemized-blocks/no_wrap.rs | 54 | /// * `to` is the receiving (local) [`ActorId`], as requested by the remote theater | COMMENT |
| HIGH | tests/target/itemized-blocks/no_wrap.rs | 64 | /// * `to` is the receiving (local) [`ActorId`], as requested by the remote theater | COMMENT |
| HIGH | tests/target/itemized-blocks/no_wrap.rs | 78 | /// * `to` is the receiving (local) [`ActorId`], as requested by the remote theater | COMMENT |
| HIGH | tests/target/itemized-blocks/wrap.rs | 109 | /// as requested by the remote theater | COMMENT |
| HIGH | tests/target/itemized-blocks/wrap.rs | 127 | /// as requested by the remote theater | COMMENT |
| HIGH | tests/target/itemized-blocks/wrap.rs | 145 | /// as requested by the remote theater | COMMENT |
| HIGH | tests/source/itemized-blocks/no_wrap.rs | 54 | /// * `to` is the receiving (local) [`ActorId`], as requested by the remote theater | COMMENT |
| HIGH | tests/source/itemized-blocks/no_wrap.rs | 64 | /// * `to` is the receiving (local) [`ActorId`], as requested by the remote theater | COMMENT |
| HIGH | tests/source/itemized-blocks/no_wrap.rs | 78 | /// * `to` is the receiving (local) [`ActorId`], as requested by the remote theater | COMMENT |
| HIGH | tests/source/itemized-blocks/wrap.rs | 62 | /// * `to` is the receiving (local) [`ActorId`], as requested by the remote theater | COMMENT |
| HIGH | tests/source/itemized-blocks/wrap.rs | 72 | /// * `to` is the receiving (local) [`ActorId`], as requested by the remote theater | COMMENT |
| HIGH | tests/source/itemized-blocks/wrap.rs | 86 | /// * `to` is the receiving (local) [`ActorId`], as requested by the remote theater | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | triagebot.toml | 4 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | triagebot.toml | 6 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | triagebot.toml | 28 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | triagebot.toml | 30 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | triagebot.toml | 68 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | triagebot.toml | 70 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | triagebot.toml | 105 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | triagebot.toml | 107 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | triagebot.toml | 111 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | triagebot.toml | 113 | # ------------------------------------------------------------------------------ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/integration.yml | 30 | # Instead, leverage `continue-on-error` | COMMENT |
| MEDIUM | src/imports.rs | 1155 | // Parse the path part of an import. This parser is not robust and is only | COMMENT |
| MEDIUM | src/visitor.rs | 958 | // N.B. This could be updated to utilize the version gates. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/test.yml | 101 | # Check if all jobs that we depend on (in the needs array) were successful (or have been skipped). | COMMENT |