Open sbueringer opened 1 year ago
/triage accepted /help
@sbueringer: This request has been marked as needing help from a contributor.
Please ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
Hi team, i just analyzed the code with goland.inspection, report:
I can help fix some warnings if needed (starting from minor changes, e.g. comments, unused variables & parameters)
It would be really good to instead research specific linters. Discuss if we want to enable them and then open a PR to add the linter and fix the findings.
It would be really good to instead research specific linters. Discuss if we want to enable them and then open a PR to add the linter and fix the findings.
The ci configured golangci linters already, do you mean to add more linters or modify the settings of existing linters?
The Idea was to see if we can enable additional linters/ rules via golangcilint.
Note this might be tricky as I expect we have a lot of exported types/funcs that are only used by external consumers
/priority backlog
It would be great if we had a linter which detects unused funcs.
I recently opened a PR to drop some unused code in KCP: https://github.com/kubernetes-sigs/cluster-api/pull/7598
I found the following cases:
I think if there is a linter 1. should be relatively easy to detect.
I'm not sure about 2., it could be that there are a lot of false positives as we probably have non-test code which is used as test utils in tests.
But even if we only find a linter for 1. it should be a good improvement
/kind feature