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

[Umbrella Issue] GolangCI lint #1309

Closed
26 of 41 tasks
Adirio opened this issue Jan 14, 2020 · 13 comments
Closed
26 of 41 tasks

[Umbrella Issue] GolangCI lint #1309

Adirio opened this issue Jan 14, 2020 · 13 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@Adirio
Copy link
Contributor

Adirio commented Jan 14, 2020

GolangCI uses several different linters concurrently to asses the code quality of this repository.

This issue lists which ones are implemented in this project:

Linters descriptions for reference
  • govet - Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
  • errcheck - Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
  • staticcheck - Staticcheck is a go vet on steroids, applying a ton of static analysis checks
  • unused - Checks Go code for unused constants, variables, functions and types
  • gosimple - Linter for Go source code that specializes in simplifying a code
  • structcheck - Finds unused struct fields
  • varcheck - Finds unused global variables and constants
  • ineffassign - Detects when assignments to existing variables are not used
  • deadcode - Finds unused code
  • typecheck - Like the front-end of a Go compiler, parses and type-checks Go code
  • bodyclose - checks whether HTTP response body is closed successfully
  • golint - Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
  • rowserrcheck - checks whether Err of rows is checked successfully
  • stylecheck - Stylecheck is a replacement for golint
  • gosec - Inspects source code for security problems
  • interfacer - Linter that suggests narrower interface types
  • unconvert - Remove unnecessary type conversions
  • dupl - Tool for code clone detection
  • goconst - Finds repeated strings that could be replaced by a constant
  • gocyclo - Computes and checks the cyclomatic complexity of functions
  • gocognit - Computes and checks the cognitive complexity of functions
  • gofmt - Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
  • goimports - Goimports does everything that gofmt does. Additionally it checks unused imports
  • maligned - Tool to detect Go structs that would take less memory if their fields were sorted
  • depguard - Go linter that checks if package imports are in a list of acceptable packages
  • misspell - Finds commonly misspelled English words in comments
  • lll - Reports long lines
  • unparam - Reports unused function parameters
  • dogsled - Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
  • nakedret - Finds naked returns in functions greater than a specified function length
  • prealloc - Finds slice declarations that could potentially be preallocated
  • scopelint - Scopelint checks for unpinned variables in go programs
  • gocritic - The most opinionated Go source code linter
  • gochecknoinits - Checks that no init functions are present in Go code
  • gochecknoglobals - Checks that no globals are present in Go code
  • godox - Tool for detection of FIXME, TODO and other comment keywords
  • funlen - Tool for detection of long functions
  • whitespace - Tool for detection of leading and trailing whitespace
  • wsl - Whitespace Linter - Forces you to use empty lines!
  • goprintffuncname - Checks that printf-like functions are named with f at the end
  • gomnd - An analyzer to detect magic numbers.
@Adirio Adirio added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 14, 2020
@Adirio

This comment has been minimized.

@camilamacedo86
Copy link
Member

HI @Adirio,

I am not sure if we need to use all checks. regards the missing ones, do you think that all would be really valid to be added or could we close this one?

@Adirio
Copy link
Contributor Author

Adirio commented May 8, 2020

I don't think we need them all, but this list will keep them tracked to know which ones we have and which we don't.
I think there is no issue with keeping this Issue opened for that reason.

@camilamacedo86
Copy link
Member

camilamacedo86 commented May 8, 2020

Sorry, I am not sure if I understood. So, what is missing to address here for we are able to close this issue?

@Adirio
Copy link
Contributor Author

Adirio commented May 8, 2020

The question is, do we really need to close this? If we do we can probably create a tag or any other way to group this kind of issues that track changes so that we can search them easily when needed even if they are closed.

@camilamacedo86
Copy link
Member

The tasks represent the needs/requirements that need to be addressed. So, if it has nothing more that should be done because is obsoleted or referred, for example, then the next step would be close it and describe why. See that any task that has no activity for a while will also be closed by the boot.

So, why you would like to keep this open? What is missing to be done here?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 6, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 5, 2020
@Adirio
Copy link
Contributor Author

Adirio commented Oct 5, 2020

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Oct 5, 2020
@camilamacedo86
Copy link
Member

HI @Adirio,

the open issues mean needs/tasks that we need to work on. IMO we have in place all lint checks that we need to. So, could you please clarify what in you POV is missing to get done for we close this one?

@camilamacedo86 camilamacedo86 added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Nov 3, 2020
@Adirio
Copy link
Contributor Author

Adirio commented Nov 3, 2020

Technically, we haven't added all linting checks, so we can't say it is really closed. Is it really a problem to leave it open and frozen?

@camilamacedo86
Copy link
Member

camilamacedo86 commented Nov 3, 2020

HI @Adirio,

Has no problem to leave open any task that has actions that should get done but we should close all tasks which are done, or get outdated, were reject and etc. In this case, would we really like to add all possible lint checks? I do not think so. And then, over the lints checks which follow that were not added in the project has anyone here that you think that should be added?

IMO I do see a reason to add none of the following lint checks and then, in this way, this task should be closed. So, if you would like to keep it open what should be addressed here? What lint still required to be added and why?

@Adirio
Copy link
Contributor Author

Adirio commented Nov 3, 2020

I don't see the need to add them right now but we may want want to add some more in the future. This issue just kept track of which were added and in which PR. But if you want we can close this issue.

@Adirio Adirio closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

4 participants