Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable testifylint and fix the issues #2065

Merged
merged 9 commits into from
Jan 2, 2025
Merged

Enable testifylint and fix the issues #2065

merged 9 commits into from
Jan 2, 2025

Conversation

denik
Copy link
Contributor

@denik denik commented Jan 2, 2025

Changes

  • Enable new linter: testifylint.
  • Apply fixes with --fix.
  • Fix remaining issues (mostly with aider).

There were 2 cases we --fix did the wrong thing - this seems to a be a bug in linter: Antonboom/testifylint#210

Nonetheless, I kept that check enabled, it seems useful, just need to be fixed manually after autofix.

Tests

Existing tests

@denik denik temporarily deployed to test-trigger-is January 2, 2025 10:42 — with GitHub Actions Inactive
Copy link

github-actions bot commented Jan 2, 2025

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 2065
  • Commit SHA: cbf097fe32bb2fb7d502953c1769668448ec3168

Checks will be approved automatically on success.

@denik denik temporarily deployed to test-trigger-is January 2, 2025 10:42 — with GitHub Actions Inactive
enable-all: true
disable:
# good check, but we have too many assert.(No)?Errorf? so excluding for now
- require-error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It tells you to use require.NoError(t, err) instead of assert.NoError(t, err). Presumably because otherwise you're reading bad values in the subsequent code.

@denik denik requested a review from pietern January 2, 2025 11:00
@denik denik marked this pull request as ready for review January 2, 2025 11:00
@denik
Copy link
Contributor Author

denik commented Jan 2, 2025

Integration failures are unrelated (TestBundleInitOnMlopsStacks).

@denik denik merged commit 0b80784 into main Jan 2, 2025
8 of 9 checks passed
@denik denik deleted the denik/testifylint branch January 2, 2025 11:03
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