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

Add gomoddirectives linter. #1817

Merged
merged 5 commits into from Mar 9, 2021
Merged

Add gomoddirectives linter. #1817

merged 5 commits into from Mar 9, 2021

Conversation

ldez
Copy link
Member

@ldez ldez commented Mar 5, 2021

https://github.com/ldez/gomoddirectives

  gomoddirectives:
    # Allow local `replace` directives. Default is false.
    replace-local: false
    # List of allowed `replace` directives. Default is empty.
    replace-allow-list:
      - launchpad.net/gocheck
    # Allow to not explain why the version has been retracted in the `retract` directives. Default is false.
    retract-allow-no-explanation: false
    # Forbid the use of the `exclude` directives. Default is false.
    exclude-forbidden: false

@ldez ldez added the linter: new Support new linter label Mar 5, 2021
.golangci.example.yml Outdated Show resolved Hide resolved
.golangci.example.yml Outdated Show resolved Hide resolved
@ldez ldez changed the title Add gomodreplace linter. Add gomoddirectives linter. Mar 6, 2021
@ldez ldez force-pushed the feat/gomodreplace branch 2 times, most recently from b4a8eaf to 76ba882 Compare March 6, 2021 12:02
Copy link

@carnott-snap carnott-snap left a comment

Choose a reason for hiding this comment

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

looks sane, meets the use cases we discussed; I have not tested this locally, but will trust the author/ci to assert its correctness. should we add some tests to verify anything, or are we trusting that is done in the upstream library?

@ldez
Copy link
Member Author

ldez commented Mar 8, 2021

@carnott-snap

should we add some tests to verify anything,

It's not possible with the current test system, but I added a lot of tests in my lib.

or are we trusting that is done in the upstream library?

FYI I'm a maintainer of golangci-lint, my code is on a public repo on GitHub, I added a lot of tests, I followed the guideline from the Go team to get the go.mod file, so yes I think that we trust me 😄

Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

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

I trust you @ldez! ❤️

@ldez ldez merged commit 94d2d80 into golangci:master Mar 9, 2021
@ldez ldez deleted the feat/gomodreplace branch March 9, 2021 17:59
@ldez ldez added this to the v1.39 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter: new Support new linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants