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

feat: option to not override severity from linters #4452

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

ldez
Copy link
Member

@ldez ldez commented Mar 4, 2024

This PR has been reverted and replaced by #4472.

The option described in this PR has been removed and replaced by another approach.

previous description
linters-settings:
  revive:
    severity: error
    rules:
      - name: unexported-return
        disabled: true
      - name: unused-parameter
        severity: warning

severity:
  default-severity: tomato
  keep-linter-severity: true
$ go run ./cmd/golangci-lint run --out-format=checkstyle                            
<?xml version="1.0" encoding="UTF-8"?>

<checkstyle version="5.0">
  <file name="pkg/golinters/stylecheck.go">
    <error column="1" line="14" message="don&#39;t use `init` function" severity="tomato" source="gochecknoinits"></error>
    <error column="31" line="24" message="unused-parameter: parameter &#39;pass&#39; seems to be unused, consider removing or renaming it as _" severity="warning" source="revive"></error>
  </file>
</checkstyle>
exit status 1

Fixes #3111
Closes #4434

@ldez ldez added the enhancement New feature or improvement label Mar 4, 2024
@ldez ldez changed the title feat: option to not override severity feat: option to not override severity from linters Mar 4, 2024
@ldez ldez added the area: config Related to .golangci.yml and/or cli options label Mar 4, 2024
@ldez ldez requested a review from alexandear March 4, 2024 16:41
@ldez ldez merged commit 3d91352 into golangci:master Mar 4, 2024
12 checks passed
@ldez ldez deleted the feat/severity-override branch March 4, 2024 19:11
@ldez ldez added this to the next milestone Mar 4, 2024
ldez added a commit to ldez/golangci-lint that referenced this pull request Mar 8, 2024
ldez added a commit to ldez/golangci-lint that referenced this pull request Mar 9, 2024
ldez added a commit to ldez/golangci-lint that referenced this pull request Mar 9, 2024
ldez added a commit to ldez/golangci-lint that referenced this pull request Mar 11, 2024
@ldez
Copy link
Member Author

ldez commented Mar 11, 2024

This PR has been reverted and replaced by #4472.

The option described in this PR has been removed and replaced by another approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: config Related to .golangci.yml and/or cli options area: severity enhancement New feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

revive: rules's severity config has no effect
3 participants