Skip to content

diffguard-domain/preprocess.rs:304: sanitize_line() is 465 lines — clippy::too_many_lines #593

@EffortlessSteven

Description

@EffortlessSteven

Preprocess::sanitize_line() at crates/diffguard-domain/src/preprocess.rs:304 is 465 lines (limit: 100).

Clippy warning:

warning: this function has too many lines (465/100)
   --> crates/diffguard-domain/src/preprocess.rs:304:5
    |
304 |     pub fn sanitize_line(\&mut self, line: &str) -> String {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This function handles masking comments and strings across multiple language syntaxes and is one of the largest functions in the workspace. It should be decomposed into smaller, focused helper methods (e.g., separate masked-comment and masked-string helpers, or per-language handlers).

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogBacklog — not currently prioritized, TBD

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions