You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: cap comment width at .editorconfig, extend budget in complex code
Adds a comment-line-too-long rule that reads max_line_length and tab_width
from .editorconfig, so the comment limit is the one the rest of the repo
already follows. It counts display columns rather than characters, since
this repo indents with tabs, and it applies to doc comments too: a doc
comment is exempt from the content budget because of what it says, not
because it may run off the screen. A local run re-wraps the line, CI only
reports it.
The 200-character content budget rises to 600 where the code a comment
introduces scores at least 10 decision points. Measure-CodeComplexity counts
them, stopping at the end of the enclosing block or after 40 lines. Measured
across the whole repo, that extends 2 percent of the comments already over
200, which is the intended rarity.
The gate then re-wrapped this branch's own over-long comments across 210
files. Six needed shortening by hand, and XML comment indentation is
normalized to tabs so the new lines pass git's indent-with-non-tab check.
Also seeds two script-scoped variables before they are read: Set-StrictMode
throws on an unset variable, which powershell-compat.ps1 hit on every run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@@ -105,18 +105,21 @@ function Assert-Unrepairable {
105
105
Assert-Category'phase-framing''// Phase 3 test (b): picking a style applies it to the selection''process-framing'
106
106
Assert-Clean'phase-clean''// Applies the selected style to the current selection'
107
107
108
-
# process-framing must not fire on "stage"/"commit" here: this codebase has a real two-step stage-then-commit UI pattern, distinct from migration-phase framing.
108
+
# process-framing must not fire on "stage"/"commit" here: this codebase has a real two-step
109
+
# stage-then-commit UI pattern, distinct from migration-phase framing.
109
110
Assert-Clean'stage-domain-term''// STAGE 1 -- the pick already populated the auxiliary picker.'
110
111
Assert-Clean'commit-domain-term''// Capture everything staged since the last boundary -- that is what this commit "writes".'
111
112
112
113
# doc-pointer -- skill worked example
113
114
Assert-Category'doc-pointer-md''// winforms-free-lexeme-editor.md D1: a plugin-claimed custom slice renders its plugin''s own control''doc-pointer'
114
115
Assert-Clean'doc-pointer-clean''// LT-22351: a plugin-claimed custom slice renders its plugin''s own control'
115
116
116
-
# doc-pointer finding-code must stay case-sensitive: "m3" is a real LCM field name (IMoStemMsa), not a design-doc finding code, despite the (?i) flag earlier in the pattern.
117
+
# doc-pointer finding-code must stay case-sensitive: "m3" is a real LCM field name (IMoStemMsa),
118
+
# not a design-doc finding code, despite the (?i) flag earlier in the pattern.
117
119
Assert-Clean'doc-pointer-lowercase-field''// Seed text matches the canonical field label (the m3 InflectionClass field label).'
118
120
119
-
# doc-pointer finding-code must not fire on function keys or generic type-parameter names, which share the letter-plus-digit shape but are ordinary code vocabulary, not design-doc codes.
121
+
# doc-pointer finding-code must not fire on function keys or generic type-parameter names, which
122
+
# share the letter-plus-digit shape but are ordinary code vocabulary, not design-doc codes.
120
123
Assert-Clean'doc-pointer-function-key''// Whether it came from a legacy view, F5/RefreshAllViews-driven, or something else.'
121
124
Assert-Clean'doc-pointer-generic-param''// Factored to a Func<T1,T2,TResult> seam so the caller can inject either path.'
'<!-- This is the file-level summary comment, and it is allowed to run long-form the same way a C# /// doc comment or a PowerShell comment-based help block can, because Xml has no other syntax to mark one. -->',
225
+
'<!--',
226
+
' This is the file-level summary comment, and it is allowed to run long-form the',
227
+
' same way a C# /// doc comment or a PowerShell comment-based help block can,',
228
+
' because Xml has no other syntax to mark a file or type level summary.',
0 commit comments