Repository navigation
join split lines, blank lines between steps across the linter - #70
Merged
Merged
Conversation
katbyte
force-pushed
the
kt/join-split-lines-blank-after-brace
branch
from
October 9, 2026 21:19
38c546f to
4f3b1ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Readability pass over every rule and lib: calls, conditions and signatures that were split across lines are joined back onto one line, and blank lines separate the steps inside longer function bodies.
Why: there is no maximum line length here. A report message split from its call hides what the rule says, and an
ifblock run straight into the next statement hides where one step ends and the next begins. Both had crept in across the repo.Calls and conditions split across lines. 59 places, mostly
Reportfcalls andt.Fatalfmessages with the message on a continuation line, and a few||conditions and the category list inchecks.go.Steps run together. 198 places. Inside a body with more than five statements, a blank line now separates a block (an
if,fororswitch) from the step that follows it, so a guard reads with the statement it protects and the next "get it, check it" step starts on its own. Short bodies of five statements or fewer are one group and get no blank lines, and a run of one-line guards stays together.if !ok || runs[fn] == nil { continue } + fn, ok := pass.TypesInfo.Defs[fd.Name].(*types.Func)Things that are fine as they are. Blank lines that were already there stay. Comments keep the repo's usual wrap width. Composite literals and function literals that span lines are untouched, since those are vertical by design. Test fixtures under
testdataare untouched, as they encode exact shapes. Four files owned by the open PRs #67, #68 and #69 are left out here and fixed inside those PRs instead, so nothing conflicts:AZT003.go,AZP002.go,lib/tf/registration.goandchecks/AZT/AZT.go.No behaviour change: build, every test and lint pass.