chore: adjust lint rules and set timeout#2123
chore: adjust lint rules and set timeout#2123google-oss-prow[bot] merged 1 commit intoGoogleContainerTools:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Camila-B The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request reorganizes linting targets in the Makefile and updates the Go linting script to include a 10-minute timeout and support for additional arguments. Feedback suggests moving hardcoded flags from the script to the .golangci.yaml configuration file to adhere to the project's style guide and improve maintainability.
|
|
||
| echo "Running golangci-lint: " | ||
| if ! OUT="$(golangci-lint run --exclude-use-default=false)"; then | ||
| if ! OUT="$(golangci-lint run --exclude-use-default=false --timeout=10m "$@")"; then |
There was a problem hiding this comment.
The --timeout and --exclude-use-default flags are hardcoded in this script. According to the repository style guide (line 102), linting configuration should ideally be managed in the .golangci.yaml file. Moving these settings to the configuration file would improve maintainability and ensure consistency across different ways of running the linter (e.g., via IDEs or direct CLI calls).
References
- Linting is done with golangci-lint (config in .golangci.yaml, run via make lint-go). (link)
11682ae
into
GoogleContainerTools:main
No description provided.