Skip to content

Comments

golangci: Enable nestif linter, grandfather existing violations#184

Merged
peterj merged 1 commit intoagentregistry-dev:mainfrom
timflannagan:enable-nestif-linter
Feb 19, 2026
Merged

golangci: Enable nestif linter, grandfather existing violations#184
peterj merged 1 commit intoagentregistry-dev:mainfrom
timflannagan:enable-nestif-linter

Conversation

@timflannagan
Copy link
Collaborator

Enable the nestif linter to detect deeply nested if statements. Deeply nested conditionals harm readability by obscuring the main code path and making it harder to maintain line-of-sight through functions.

We grandfather existing violations with nolint directives rather than refactoring, since the nested code is often in CLI commands where complexity is inherent. Also flatten a couple test assertions using early returns.

Enable the nestif linter to detect deeply nested if statements. Deeply
nested conditionals harm readability by obscuring the main code path
and making it harder to maintain line-of-sight through functions.

We grandfather existing violations with nolint directives rather than
refactoring, since the nested code is often in CLI commands where
complexity is inherent. Also flatten a couple test assertions using
early returns.
@peterj peterj merged commit 20b1e7b into agentregistry-dev:main Feb 19, 2026
3 checks passed
@timflannagan timflannagan deleted the enable-nestif-linter branch February 19, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants