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: add errchkjson linter #2349

Closed
wants to merge 7 commits into from
Closed

Commits on Nov 8, 2021

  1. Add errchkjson linter

    breml committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    3b13842 View commit details
    Browse the repository at this point in the history
  2. Make report-no-exported configurable

    Prevent redundant checking with staticcheck.
    
    See:
    * golangci#2349 (comment)
    * https://staticcheck.io/docs/checks/#SA9005
    breml committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    78e0e0e View commit details
    Browse the repository at this point in the history
  3. Exclude json encoding functions from errcheck

    if errchkjson is enabled and omit-safe is not activated.
    
    In this case, the check for the errors in errchkjson
    is superior to the "generic" check in errcheck.
    Therefore we instruct errcheck to ignore these
    cases and let errchkjson handle them.
    breml committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    a6b6db9 View commit details
    Browse the repository at this point in the history
  4. Add errchkjson linter

    breml committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    869c2ff View commit details
    Browse the repository at this point in the history
  5. Fix typo, order imports

    Update pkg/golinters/errchkjson.go
    Update test/testdata/errchkjson.go
    Update test/testdata/errchkjson_omit_safe.go
    
    Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
    breml and ldez committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    0607414 View commit details
    Browse the repository at this point in the history
  6. Update errchkjson to v0.2.0

    breml committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    228fb75 View commit details
    Browse the repository at this point in the history
  7. Fix typo

    breml committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    b4d995b View commit details
    Browse the repository at this point in the history