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

Implement a checker for the golang staticcheck tool #1541

Merged
merged 7 commits into from Mar 19, 2019

Commits on Mar 19, 2019

  1. Implement a checker for the golang staticcheck tool

    This commit implements `go-staticcheck`, a checker wrapping the `staticcheck`
    tool. `staticcheck` is the successor to `megacheck`, which is now
    deprecated.
    
    This commit includes:
    
    1. A checker definition for `go-staticcheck`.
    2. The introduction of a new variable, `flycheck-go-version`, which can be
    passed to `staticcheck` to specify the version of the Go compiler to perform
    checks compatible with.
    3. A test for `staticcheck`.
    4. Updates to appropriate documentation.
    5. Updates to other Golang syntax checkers to prefer falling back to
    `staticcheck` before `megacheck`.
    
    The documentation pass includes:
    
    1. `rst` docs for `go-staticcheck` itself.
    2. An update to the documentation for `megacheck`, specifying that it's
    deprecated.
    3. Documentation for the new `flycheck-go-version` variable.
    4. Updating the definition of `flycheck-go-build-tags` to correctly declare the
    full list of checkers that can use it.
    Gastove committed Mar 19, 2019
    Copy the full SHA
    1cc8d2f View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    60a1ec4 View commit details
    Browse the repository at this point in the history
  3. PR Feedback + Enhancements

    This commit changes several things:
    
    1. Based on PR feedback from @fmdkdd, don't force `staticcheck` to run in the
    local directory -- it's fine, but unnecessary.
    2. Switch to using `staticcheck`'s JSON output; add a parser for it. This allows
    parsing error severity, which is excellent.
    3. Add a buttercup test for `flycheck-parse-go-staticcheck`, and update the
    `staticcheck` integration test to correctly reflect new error parsing.
    Gastove committed Mar 19, 2019
    Copy the full SHA
    a27dc98 View commit details
    Browse the repository at this point in the history
  4. Run make format.

    Gastove committed Mar 19, 2019
    Copy the full SHA
    5e234ff View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    6ed2756 View commit details
    Browse the repository at this point in the history
  6. Disable go-megacheck in staticcheck tests and staticcheck in megachec…

    …k, build tests
    
    I'm trying to fix errors in CI I can't reproduce locally. My current hypothesis
    is that megacheck is stomping on staticcheck, and staticcheck is harming both
    megacheck and go-build.
    Gastove committed Mar 19, 2019
    Copy the full SHA
    cbc60db View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    22abe7d View commit details
    Browse the repository at this point in the history