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

Try to make (make lint) pass with Go 1.18 #1492

Merged
merged 1 commit into from Mar 16, 2022

Commits on Mar 15, 2022

  1. Try to make (make lint) pass with Go 1.18

    This is an attempt to fix (make lint), which complains:
    > pkg/tlsclientconfig/tlsclientconfig_test.go:37:20: SA1019: tlsc.RootCAs.Subjects is deprecated: if s was returned by SystemCertPool, Subjects will not include the system roots. (staticcheck)
    >       for _, s := range tlsc.RootCAs.Subjects() {
    >                         ^
    > pkg/tlsclientconfig/tlsclientconfig_test.go:43:20: SA1019: systemCertPool.Subjects is deprecated: if s was returned by SystemCertPool, Subjects will not include the system roots. (staticcheck)
    >       for _, s := range systemCertPool.Subjects() {
    >                         ^
    > pkg/tlsclientconfig/tlsclientconfig_test.go:53:20: SA1019: tlsc.RootCAs.Subjects is deprecated: if s was returned by SystemCertPool, Subjects will not include the system roots. (staticcheck)
    >       for _, s := range tlsc.RootCAs.Subjects() {
    
    ... but the same staticcheck linter, for some reason, does NOT
    complain about these deprecated fields; the correct //lint:ignore
    comments are ineffective and actually cause extra warnings.
    
    So, silence all of staticcheck via //nolint , hopefully temporarily.
    
    (Also, note that golangci-lint itself, with this update,
    crashes with golangci/golangci-lint#2374 ;
    a local rebuild does not crash, but still fails per the above.)
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Mar 15, 2022
    Copy the full SHA
    d95221d View commit details
    Browse the repository at this point in the history