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

Disabled deprecated linters on golangci-lint #3139

Closed
wants to merge 0 commits into from
Closed

Conversation

Gre8t
Copy link
Contributor

@Gre8t Gre8t commented Mar 28, 2022

I had to disable the linters to fix the warning in #3012. We already have an "enable-all" in the linters' section of the config file set to true, then the recommended linters for deprecated are all enabled.

Release Note

NONE

@Gre8t
Copy link
Contributor Author

Gre8t commented Mar 28, 2022

@astefanutti @squakez

Copy link
Member

@astefanutti astefanutti left a comment

Choose a reason for hiding this comment

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

@Gre8t thanks, that looks good, could you please remove that extra merge commit?

@oscerd
Copy link
Contributor

oscerd commented Mar 28, 2022

Looks good, but please rebase.

@Gre8t
Copy link
Contributor Author

Gre8t commented Mar 28, 2022

Alright. Thank you for the feedback

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

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

Recently there was an effort to keep the linters in alphabetical order. Please try to follow that pattern as well.

@Gre8t
Copy link
Contributor Author

Gre8t commented Mar 28, 2022

Hi, I have being stuck in how to rebase and at the same time remove the merge commit

@astefanutti
Copy link
Member

You just need to remove commit 9e38a6d, which you should be able to do with git rebase -i HEAD~2, dropping that commit, and re-push the branch.

@tadayosi
Copy link
Member

@Gre8t Just for a tip, I'd always create a different branch for submitting a pull req:

git checkout -b disable-deprecate-linters

then rebasing the latest main is as easy as (assuming the upstream repo is named as upstream):

git fetch upstream main:main
git rebase main

After that you can force-push the branch to your repo:

git push origin disable-deprecate-linters -f

.golangci.yml Outdated
- testpackage
- varnamelen
- whitespace
- wrapcheck
- wsl
- interfacer
Copy link
Contributor

Choose a reason for hiding this comment

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

This is provided twice, you should remove from this line

.golangci.yml Outdated
@@ -40,6 +40,8 @@ linters:
- gofumpt
- gomnd
- gomoddirectives
- golint
Copy link
Member

Choose a reason for hiding this comment

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

golint should be put before gomnd

@Gre8t
Copy link
Contributor Author

Gre8t commented Apr 2, 2022

Thank you everyone for your help. I have implemented the corrections in pr #3158. Is it ok to close this pr?

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.

None yet

5 participants