zmap / zlint

X.509 Certificate Linter focused on Web PKI standards and requirements.
https://zmap.io
Apache License 2.0
353 stars 107 forks source link

Update to Go 1.18 and update GolangCI Linter #672

Closed christopher-henderson closed 2 years ago

christopher-henderson commented 2 years ago

sigh golangci broke itself and began to fail to compile which forced an upgrade to a version that added just a ton of useless and asinine lints.

zakird commented 2 years ago

@christopher-henderson I didn't merge this tests seemed to be failing (and now merge conflict). I can if we need to force it through (post merge)

christopher-henderson commented 2 years ago

Thanks you so much @zakird for hopping on a batch of topics yesterday :pray:

This one...this one is getting an exasperated sigh from me. Master is broken because the linter itself no longer works and requires an upgrade (including an upgrade to Go 1.18 which is all well and good).

Unfortunately, the linter update is coming bundled with an absolute ocean of useless and frankly, idiotic, lints. For example, the variable ip no longer appears to be good enough for the linter (it is clearly requiring that anything with a global scope have a minimum name length which is...naive). And this is not a warning, the variable ip is a full on error.

So I'm fighting the urge to blindly disable this thing and pecking through its demands.

EDIT:

I am truly stunned. ireturn considers it a hard error to return an interface type. paralleltest considers it an error if a test is not ran in parellel.

And behold their king and ruler, nlreturn, whose docs declare that the following is a hard error...

func foo() int {
    a := 0
    _ = a
    return a
}

Apparently "correct" code is...

func foo() int {
    a := 0
    _ = a

    return a
}

I am suddenly finding myself wishing that GitHub had a downvote option.

zakird commented 2 years ago

I vote disable it, get master back to healthy, and then we can deal with this independently of everything else.

On Sat, Apr 16, 2022 at 8:46 AM Christopher Henderson < @.***> wrote:

Thanks so @zakird https://github.com/zakird for hopping on a batch of topics yesterday 🙏

This one...this one is getting an exasperated sigh from me. Master is broken because the linter itself no longer works and requires an upgrade (including an upgrade to Go 1.18 which is all well and good).

Unfortunately, the linter update is coming bundled with an absolute ocean of useless and frankly, idiotic, lints For example, the variable ip no longer appears to be good enough for the linter (it is clearly requiring that anything with a global scope have a minimum name length which is...naive). And it's not a warning, the variable ip is a full on error.

So I'm fighting the urge to blindly disable this thing and pecking through its demands,

— Reply to this email directly, view it on GitHub https://github.com/zmap/zlint/pull/672#issuecomment-1100693437, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABREUAI6DEM47UJ5CHFZFDVFLOFJANCNFSM5S7EHOTA . You are receiving this because you were mentioned.Message ID: @.***>