Open mateusoliveira43 opened 2 months ago
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands.
goimports is automatically run in vscode on save by default.. if editorconfig/ci runs equivalent of goimports that would save me some sanity around imports shuffling and having to save with this setting.
I use this is settings.json
to avoid problems
"[go]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "never"
}
},
Describe the problem/challenge you have Velero is composed of various repositories, for example:
All of them being primarily written in Go and maintained by the same people. So, it makes sense these repositories have the same quality standards
Some suggested standardization
go dependencies: check if go mod tidy was run and run go mod verify (I believe this already done, highlighting in docs these is enforced by CI would be great)
tests: each repository responsibility, but we could standardize a minimal test coverage each repository must achieve (
go tool cover -func=<cover_report_name>
andgo tool cover -html=<cover_report_name>
can help on this)go linters: check golangci-lint in all Velero repositories, using same tool version and config in all repositories
dockerfile linter: check hadolint in all Velero repositories, using same tool version and config in all repositories
shell files linter: check shellcheck in all Velero repositories, using same tool version and config in all repositories
files format: check editorconfig in all Velero repositories, using same tool version and config in all repositories
Describe the solution you'd like
The quality checks would be enforced by CI, but have to be also possible to run locally by developers (must be documented).
A suggestion would be the creation of a auxiliary repository, that would create a development image used along all Velero repositories. Example with just golangci-lint:
Calling that image
velero-development
, we would, for example, changemake lint
instruction to beAnything else you would like to add:
Other tools can also be integrated, like pre-commit, to run some quality checks prior to developer commiting something.
Environment:
Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.