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

dev: use cmd.Context inside custom command #4496

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

alexandear
Copy link
Member

  • Use cmd.Context() instead of context.Background. Currently, they are the same but this might change in the future.
  • Remove the space from the custom command short description for consistency with other commands in this repo.
  • Capitalize the stderr output message and add a semicolon for clarity:
    • before:
      > ./custom-golangci-lint run
      ...
      failed executing command with error build linters: plugin(someplugin): plugin "someplugin" not found
      
    • after:
      > ./custom-golangci-lint run
      ...
      Failed executing command with error: build linters: plugin(someplugin): plugin "someplugin" not found
      

@alexandear alexandear changed the title dev: pass context from cmd; improve error output dev: cosmetics for custom command Mar 13, 2024
@alexandear alexandear changed the title dev: cosmetics for custom command dev: improve custom command Mar 13, 2024
@alexandear alexandear added the topic: cleanup Related to code, process, or doc cleanup label Mar 13, 2024
@ldez ldez changed the title dev: improve custom command dev: use cmd.Context inside custom command Mar 13, 2024
@ldez ldez added this to the next milestone Mar 13, 2024
@ldez ldez self-requested a review March 13, 2024 12:23
@ldez ldez merged commit 2a1afc1 into golangci:master Mar 13, 2024
12 checks passed
@alexandear alexandear deleted the feat/pass-ctx-change-err-out branch March 13, 2024 13:06
@ldez ldez added the area: CLI Related to CLI label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: CLI Related to CLI topic: cleanup Related to code, process, or doc cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants