Skip to content

golangci: Enable testifylint#191

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

golangci: Enable testifylint#191
peterj merged 1 commit intoagentregistry-dev:mainfrom
timflannagan:enable-testifylint

Conversation

@timflannagan
Copy link
Copy Markdown
Collaborator

@timflannagan timflannagan commented Feb 19, 2026

Description

Enable testifylint to enforce testify best practices. We fix all violations by using require.NoError/require.Error instead of assert for error checks. This is the correct pattern since there's no point continuing a test after an error assertion fails.

This is a linter enabled in a couple of different projects (gateway-api comes immediate to mind).

Change Type

/kind cleanup

Changelog

NONE

Additional Notes

Enable testifylint to enforce testify best practices. We fix all
violations by using require.NoError/require.Error instead of assert
for error checks. This is the correct pattern since there's no point
continuing a test after an error assertion fails.
@peterj peterj merged commit 004cc61 into agentregistry-dev:main Feb 19, 2026
5 checks passed
@timflannagan timflannagan deleted the enable-testifylint branch February 19, 2026 21:15
christian-posta pushed a commit to christian-posta/agentregistry that referenced this pull request Mar 9, 2026
<!--
Thanks for opening a PR! Please delete any sections that don't apply.
-->

# Description

<!--
A concise explanation of the change. You may include:
- **Motivation:** why this change is needed
- **What changed:** key implementation details
- **Related issues:** e.g., `Fixes agentregistry-dev#123`
-->

Enable testifylint to enforce testify best practices. We fix all
violations by using require.NoError/require.Error instead of assert for
error checks. This is the correct pattern since there's no point
continuing a test after an error assertion fails.

This is a linter enabled in a couple of different projects (gateway-api
comes immediate to mind).

# Change Type

<!--
Select one or more of the following by including the corresponding
slash-command:
```
/kind breaking_change
/kind bump
/kind cleanup
/kind design
/kind deprecation
/kind documentation
/kind feature
/kind fix
/kind flake
/kind install
```
-->

/kind cleanup

# Changelog

<!--
Provide the exact line to appear in release notes for the chosen
changelog type.

If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
-->

```release-note
NONE
```

# Additional Notes

<!--
Any extra context or edge cases for reviewers.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants