Conversation
|
The |
|
Hi @kerolasa, thanks for the PR. I think we need to add the golangci lint to the CI workflow, to ensure the compliance is verified and preserved. It will also codify the settings and the version, because I can't see them in this commit. Can you please:
Thanks! |
psltool.go:107:15: Error return value of `fmt.Fprintln` is not checked (errcheck) psltool.go:110:15: Error return value of `fmt.Fprintln` is not checked (errcheck) psltool.go:120:23: Error return value of `mdiff.FormatUnified` is not checked (errcheck) psltool.go:205:15: Error return value of `fmt.Fprintln` is not checked (errcheck) psltool.go:209:15: Error return value of `fmt.Fprintln` is not checked (errcheck) psltool.go:273:15: Error return value of `fmt.Fprintln` is not checked (errcheck) psltool.go:275:15: Error return value of `fmt.Fprintln` is not checked (errcheck) psltool.go:277:15: Error return value of `fmt.Fprintf` is not checked (errcheck) psltool.go:280:16: Error return value of `io.WriteString` is not checked (errcheck) psltool.go:284:16: Error return value of `fmt.Fprintln` is not checked (errcheck) psltool.go:286:17: Error return value of `io.WriteString` is not checked (errcheck) psltool.go:290:15: Error return value of `fmt.Fprintln` is not checked (errcheck) psltool.go:327:15: Error return value of `fmt.Fprintln` is not checked (errcheck) psltool.go:331:17: Error return value of `os.Stdout.Write` is not checked (errcheck) psltool.go:100:10: ST1005: error strings should not be capitalized (staticcheck) psltool.go:124:11: ST1005: error strings should not be capitalized (staticcheck) psltool.go:127:11: ST1005: error strings should not be capitalized (staticcheck) psltool.go:130:11: ST1005: error strings should not be capitalized (staticcheck) psltool.go:171:10: ST1005: error strings should not be capitalized (staticcheck) psltool.go:174:10: ST1005: error strings should not be capitalized (staticcheck) Signed-off-by: Sami Kerola <kerolasa@cloudflare.com>
internal/parser/validate.go:235:12: Error return value of `group.Wait` is not checked (errcheck)
internal/parser/validate.go:250:12: Error return value of `group.Wait` is not checked (errcheck)
internal/parser/write.go:20:14: Error return value of `fmt.Fprintf` is not checked (errcheck)
internal/parser/write.go:75:14: Error return value of `fmt.Fprintf` is not checked (errcheck)
newgtlds.go:345:23: Error return value of `resp.Body.Close` is not checked (errcheck)
newgtlds_test.go:553:17: Error return value of `os.Remove` is not checked (errcheck)
newgtlds_test.go:561:17: Error return value of `os.Remove` is not checked (errcheck)
newgtlds_test.go:573:17: Error return value of `os.Remove` is not checked (errcheck)
newgtlds_test.go:583:17: Error return value of `os.Remove` is not checked (errcheck)
newgtlds_test.go:593:17: Error return value of `os.Remove` is not checked (errcheck)
newgtlds_test.go:668:16: Error return value of `fmt.Fprintln` is not checked (errcheck)
internal/parser/clean.go:421:2: S1011: should replace loop with out.Text = append(out.Text, inf.Other...) (staticcheck)
internal/parser/diff.go:266:7: S1002: should omit comparison to bool constant, can be simplified to !b.info().isUnchanged (staticcheck)
internal/parser/errors.go:24:59: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:34:84: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:44:79: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:56:74: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:67:69: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:79:72: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:90:61: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:100:70: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:110:73: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:122:52: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:130:72: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/errors.go:138:75: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/exceptions.go:32:2: S1008: should use 'return missingTXT.Has(domain.String())' instead of 'if missingTXT.Has(domain.String()) { return true }; return false' (staticcheck)
internal/parser/parser.go:266:8: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/parser.go:419:26: QF1008: could remove embedded field "SourceRange" from selector (staticcheck)
internal/parser/exceptions.go:25:6: func exemptFromSorting is unused (unused)
internal/parser/exceptions.go:77:5: var incorrectSort is unused (unused)
Signed-off-by: Sami Kerola <kerolasa@cloudflare.com>
This is my first github workflow ever, lets hope this works. Requested-by: Simone Carletti <weppos@weppos.net> Reference: publicsuffix#2512 Signed-off-by: Sami Kerola <kerolasa@cloudflare.com>
7fc2cc5 to
e7d3895
Compare
Signed-off-by: Sami Kerola <kerolasa@cloudflare.com>
|
Hello @weppos. I am not sure if the github workflow change looks the way you hoped. That's my first try with the github workflow, so it might be severely lacking in quality or even working. Anyways, I tried something rebased the pull and added go vendor updates as a minor maintenance bonus. Oh, and what comes to adding .golangci.yml config. I have had some fun fixing v1 vs v2 golangci issues that I really believe best option is to run without config and let the defaults take precedence. |
This pull request addresses all golangci-lint warnings in this repository. One could say some of the changes are overly pedantic, but that should be fine. It is better to get rid of all the warnings, so that the lint tooling can catch regressions if and when they happen. The golangci-lint i used is v2.