Skip to content

feat: [gocritic] support disabled-tags #1029

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

Merged
merged 1 commit into from
Apr 22, 2020
Merged

Conversation

kaka19ace
Copy link
Contributor

Linter Gocritic:
Features:

  • support disabled-tags
    using tag set-operation instead of disabled-checks inputs
    ...
    enabled-tags:
      - performance
    disabled-tags:
      - experimental 
    ...

@CLAassistant
Copy link

CLAassistant commented Apr 20, 2020

CLA assistant check
All committers have signed the CLA.

@kaka19ace
Copy link
Contributor Author

kaka19ace commented Apr 21, 2020

For example:
From Docs: https://go-critic.github.io/overview# , we get the message about
some options with optional tags [experimental, opinionated].

using enabled-tags and disabled-tags would be more simplified than combination of enabled-tags and disable-checks

with disabled-tags

    ...
    enabled-tags:
      - diagnostic
      - style
    disabled-tags:
      - experimental 
      - opinionated
    ...

with disabled-checks

    ...
    enabled-tags:
      - diagnostic
      - style
    disabled-checks:
      - argOrder
      - badCall
      - badCond
     -  boolExprSimplify
      - codegenComment
      - commentedOutCode
      - deprecatedComment
      - exitAfterDefer
      - ...
    ...

Copy link
Member

@ernado ernado left a comment

Choose a reason for hiding this comment

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

Thank you, LGTM.

Can you please apply gofmt or goimports?

@kaka19ace kaka19ace force-pushed the master branch 4 times, most recently from d6932da to 355a720 Compare April 22, 2020 03:58
@kaka19ace
Copy link
Contributor Author

kaka19ace commented Apr 22, 2020

Thank you, LGTM.

Can you please apply gofmt or goimports?

Hi, I've finished format and reduce InferEnabledChecks complexity by subfunction filterByDisableTags .

it's only one commit because using cmd git push -f

@kaka19ace kaka19ace requested a review from ernado April 22, 2020 06:55
Copy link
Member

@ernado ernado left a comment

Choose a reason for hiding this comment

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

LGTM

@kaka19ace
Copy link
Contributor Author

LGTM

Thanks😀

@ernado
Copy link
Member

ernado commented Apr 22, 2020

I will check it manually once again and merge soon.

@ernado ernado merged commit aed4806 into golangci:master Apr 22, 2020
@ldez ldez added this to the v1.25 milestone Mar 6, 2024
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.

4 participants