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

lint: update staticcheck to 2021.1.1 #72313

Merged
merged 10 commits into from
Nov 19, 2021

Commits on Nov 18, 2021

  1. cli: ignore lint SA1019

    This lint checks for the use of context-aware APIs that aren't
    supported by DriverConn.
    
    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    4d85a85 View commit details
    Browse the repository at this point in the history
  2. *: fix S1025 violations

    This lint checks for unnecessary uses of Sprintf. I don't love this
    linter, but there were only a few violations of it.
    
    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d352ce3 View commit details
    Browse the repository at this point in the history
  3. roachtest: fix SA6000 violation

    This lint checks for uses of regular expressions in a loop where the
    regular expresion compilation can be hoisted.
    
    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    671803c View commit details
    Browse the repository at this point in the history
  4. geo: ignore SA4026 lint violation

    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    d1d6a0c View commit details
    Browse the repository at this point in the history
  5. *: fix S1040 (unnecessary type assertion) violations

    This removes type assertions on variables that are already the type
    being asserted. This isn't a completely equivalent transformation,
    since in the case of nil interface types, these type assertions would
    have previously produced a panic.
    
    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    0ba8455 View commit details
    Browse the repository at this point in the history
  6. storage: fix SA4023 violation

    A comparison with the untyped nil here would never be true in this
    case because of the cast.
    
    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    6b6a106 View commit details
    Browse the repository at this point in the history
  7. sql: fix ineffectual assignment in tests

    The SetNotTight function modifies the receiver so needs a pointer
    receiver to be useful.
    
    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    41d643c View commit details
    Browse the repository at this point in the history
  8. util/log: fix S1017 violation

    strings.TrimSuffix does a HasSuffix check, so it can be called
    unconditionally.
    
    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    17bb738 View commit details
    Browse the repository at this point in the history
  9. spanconfig: fix ineffective assignment

    This method sets the `initialized` field, so needs a pointer receiver
    for the assignment to be effective.
    
    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    a006961 View commit details
    Browse the repository at this point in the history
  10. lint: update staticcheck to 2021.1.1

    This version contains performance improvements according to the
    upstream changelog.
    
    The biggest downside is that the whole-program mode has been removed
    from the unused linter. For information about why it was removed see
    
    https://staticcheck.io/changes/2020.2/#unused-whole-program
    
    This PR also updates the following additional dependencies
    
    - [github.com/BurntSushi/toml v0.3.1...v0.4.1](BurntSushi/toml@v0.3.1...v0.4.1)
    - [golang.org/x/mod v0.4.2...v0.5.1](golang/mod@v0.4.2...v0.5.1)
    - [golang.org/x/sys 69cdffdb9359...a2f17f7b995](golang/sys@69cdffd...a2f17f7)
    - [golang.org/x/tools v0.1.5...v0.1.7](golang/tools@v0.1.5...v0.1.7)
    
    Release note: None
    stevendanna committed Nov 18, 2021
    Configuration menu
    Copy the full SHA
    acc0f8b View commit details
    Browse the repository at this point in the history