Skip to content

Redesign checkLineWidth: should not scan entire file content #343

Open

Description

@David-Noble-at-work

Migrated from NobleFactor/noblefactor-engprod#119 (star now lives in this repository; GitHub blocks private→public transfers). Original discussion remains there.

Problem

checkLineWidth takes the entire file content as a string and scans every line. This is wrong for two reasons:

  1. Whole-file scanning is redundant. The orchestrator already has structured declaration data from the provider. Line-width checking should operate on declarations, not raw file text.

  2. Hardcoded skip conditions. The under-filled comment detection has hardcoded knowledge about SPDX headers, copyright lines, delineators, bullet items, section headers, directives, and code blocks. This belongs in the taxonomy, not in a raw text scanner.

Current signature

func checkLineWidth(content string, width int) []LineViolation

Expected design

Line-width violations should be detected per-declaration using structured data from the taxonomy pipeline, consistent with how doc-comment checking already works. Over-long code lines (non-comment) can remain a simple line scan, but under-filled comment detection should use parsed elements, not raw text with special-case skips.

Activity

  1. added a commit that references this issue on Nov 7, 2026
  2. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rule it breaks:

    • no-evidence: no Evidence of completion section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions