Skip to content

fix(cmd/linters): truncate multiline descriptions #1663

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

Merged
merged 1 commit into from
Feb 7, 2021
Merged

fix(cmd/linters): truncate multiline descriptions #1663

merged 1 commit into from
Feb 7, 2021

Conversation

jlucktay
Copy link
Contributor

For any linters that have a multiline description, displaying such as part of the golangci-lint linters output can be confusing, especially without colourised output on your terminal.

Fixes #1594.

@boring-cyborg
Copy link

boring-cyborg bot commented Jan 23, 2021

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Jan 23, 2021

CLA assistant check
All committers have signed the CLA.

@ldez
Copy link
Member

ldez commented Feb 7, 2021

The impact of this PR on the output of golangci-lint linters:

@@ -46,15 +46,7 @@
 exportloopref: checks for pointers to enclosing loop variables [fast: true, auto-fix: false]
 forbidigo: Forbids identifiers [fast: true, auto-fix: false]
 gci: Gci control golang package import order and make it always deterministic. [fast: true, auto-fix: true]
-gochecknoglobals: check that no global variables exist
-
-This analyzer checks for global variables and errors on any found.
-
-A global variable is a variable declared in package scope and that can be read
-and written to by any function within the package. Global variables can cause
-side effects which are difficult to keep track of. A code in one function may
-change the variables state while another unrelated chunk of code may be
-effected by it. [fast: true, auto-fix: false]
+gochecknoglobals: check that no global variables exist [fast: true, auto-fix: false]
 gocognit: Computes and checks the cognitive complexity of functions [fast: true, auto-fix: false]
 godot: Check if comments end in a period [fast: true, auto-fix: true]
 godox: Tool for detection of FIXME, TODO and other comment keywords [fast: true, auto-fix: false]

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

For any linters that have a multiline description, displaying such as part of the 'golangci-lint
linters' output can be confusing, especially without colourised output on your terminal.

fix #1594
@ldez ldez merged commit 000a815 into golangci:master Feb 7, 2021
@golangci-automator
Copy link

Hey, @jlucktay — we just merged your PR to golangci-lint! 🔥🚀

golangci-lint is built by awesome people like you. Let us say “thanks”: we just invited you to join the GolangCI organization on GitHub.
This will add you to our team of maintainers. Accept the invite by visiting this link.

By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.
More information about contributing is here.

Thanks again!

ashanbrown pushed a commit to ashanbrown/golangci-lint that referenced this pull request Feb 20, 2021
@ldez ldez added this to the v1.37 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants