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

Replace linter gocyclo with gocognit #3486

Merged
merged 5 commits into from
Nov 15, 2023

Conversation

tung2744
Copy link
Contributor

@tung2744 tung2744 commented Nov 14, 2023

ref #3338

What have been done:

  1. Turn on gocognit liniter
  2. Ignore gocognit errors if:
    • The code do not have tests. We don't want to risk introducing bugs before next release.
    • The code will not be updated or maintained, and is going to be removed. e.g. latte, interaction, interaction webapp.
    • The code is one time use, e.g. scripts.
  3. Fix remaining gocognit errors.
  4. Turn off gocyclo linter.

@tung2744 tung2744 changed the base branch from main to cooldown-8 November 14, 2023 08:29
@louischan-oursky louischan-oursky self-requested a review November 14, 2023 10:52
Makefile Outdated
@@ -39,7 +39,7 @@ test:

.PHONY: lint
lint:
golangci-lint run ./cmd/... ./pkg/... --timeout 7m
golangci-lint run ./cmd/... ./pkg/... --timeout 7m --max-issues-per-linter 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

This flag should be set in the configuration file. https://golangci-lint.run/usage/configuration/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated, thanks!

@louischan-oursky louischan-oursky merged commit 4bc3a56 into authgear:cooldown-8 Nov 15, 2023
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