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

Use golangci-lint #1044

Merged
merged 10 commits into from Feb 8, 2021
Merged

Use golangci-lint #1044

merged 10 commits into from Feb 8, 2021

Conversation

@umarcor
Copy link
Contributor

@umarcor umarcor commented Feb 26, 2020

Close #952
Close #968

golangci-lint is added to Travis CI. Then, multiple linting issues are fixed: errors are handled, unused variables/functions are removed, unnecessary types are removed, frequently used strings are defined as constants, etc.

Ref #876

@umarcor umarcor changed the title Golangci lint golangci-lint Feb 26, 2020
.gitignore Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@jharshman jharshman changed the title golangci-lint use golangci-lint Feb 26, 2020
@jharshman jharshman changed the title use golangci-lint Use golangci-lint Feb 26, 2020
@umarcor umarcor force-pushed the golangci-lint branch 5 times, most recently from 3833ba1 to 22db848 Mar 1, 2020
umarcor added a commit to umarcor/cobra that referenced this issue Mar 1, 2020
@umarcor umarcor force-pushed the golangci-lint branch 2 times, most recently from 0744038 to a511ff5 Apr 13, 2020
@umarcor
Copy link
Contributor Author

@umarcor umarcor commented Apr 13, 2020

This PR is now rebased, and the issues introduced in the latest contributions to master are fixed. The failure of the labeler seems to be external.

umarcor added a commit to umarcor/cobra that referenced this issue Apr 13, 2020
@umarcor umarcor mentioned this pull request Apr 13, 2020
@umarcor
Copy link
Contributor Author

@umarcor umarcor commented May 11, 2020

I rebased and fixed the issues introduced in the latest contributions to master. Since the failing labeler was removed recently, all tests are green now.

umarcor added a commit to umarcor/cobra that referenced this issue May 11, 2020
umarcor added a commit to umarcor/cobra that referenced this issue May 11, 2020
umarcor added a commit to umarcor/cobra that referenced this issue May 11, 2020
@umarcor
Copy link
Contributor Author

@umarcor umarcor commented Jul 4, 2020

This PR was rebased again and some issues introduced in *completions* were fixed.

/cc @marckhouzam 39d3f42 (#1044)

umarcor added a commit to umarcor/cobra that referenced this issue Jul 4, 2020
@umarcor umarcor force-pushed the golangci-lint branch 3 times, most recently from 1f6cd54 to 964c294 Jul 11, 2020
umarcor added a commit to umarcor/cobra that referenced this issue Jul 11, 2020
umarcor added 4 commits Feb 2, 2021
* field 'tc'
* 'isEmpty', 'executeTemplate', 'writeStringToFile', 'update' and 'checkLackFiles'
* 'writeToFile', 'commentifyString', 'stringInStringSlice' and 'exists'
@umarcor
Copy link
Contributor Author

@umarcor umarcor commented Feb 2, 2021

@jharshman, this is ready. Shall I move the last two commits to new PRs?

@jharshman
Copy link
Collaborator

@jharshman jharshman commented Feb 3, 2021

@umarcor yes that would be great.

@umarcor
Copy link
Contributor Author

@umarcor umarcor commented Feb 4, 2021

Done.

@jharshman
Copy link
Collaborator

@jharshman jharshman commented Feb 6, 2021

@umarcor can you please squash your commits?

@umarcor
Copy link
Contributor Author

@umarcor umarcor commented Feb 7, 2021

@jharshman I think that preserving the commits is meaningful in this case, because each of them fixes a different linter warning/error. They could have been multiple PRs. Anyway, GitHub's web UI should allow you to resolve this PR by Merge, Squash or Rebase, as you wish.

@jharshman jharshman merged commit 652c755 into spf13:master Feb 8, 2021
2 checks passed
@umarcor umarcor deleted the golangci-lint branch Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants