Skip to content

Add golangci linter configuration#2930

Merged
aldas merged 1 commit intolabstack:masterfrom
aldas:golangci_conf
Apr 1, 2026
Merged

Add golangci linter configuration#2930
aldas merged 1 commit intolabstack:masterfrom
aldas:golangci_conf

Conversation

@aldas
Copy link
Copy Markdown
Contributor

@aldas aldas commented Mar 31, 2026

Relates to: #2924

NB: it does not fix couple of staticcheck problems that are being reported

[x@x echo]$ golangci-lint run 
bind.go:158:6: QF1001: could apply De Morgan's law (staticcheck)
                if !(isElemSliceOfStrings || isElemString || isElemInterface) {
                   ^
middleware/basic_auth.go:124:8: QF1001: could apply De Morgan's law (staticcheck)
                                if !(len(auth) > l+1 && strings.EqualFold(auth[:l], basic)) {
                                   ^
middleware/static.go:253:8: QF1001: could apply De Morgan's law (staticcheck)
                                if !(errors.As(err, &he) && config.HTML5 && he.StatusCode() == http.StatusNotFound) {
                                   ^
route.go:88:4: QF1012: Use fmt.Fprintf(...) instead of WriteString(fmt.Sprintf(...)) (staticcheck)
                        uri.WriteString(fmt.Sprintf("%v", pathValues[n]))
                        ^
router.go:998:30: QF1008: could remove embedded field "RouteInfo" from selector (staticcheck)
                rPath = matchedRouteMethod.RouteInfo.Path

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.01%. Comparing base (19364e2) to head (cd9cb37).
⚠️ Report is 15 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2930   +/-   ##
=======================================
  Coverage   93.01%   93.01%           
=======================================
  Files          43       43           
  Lines        4496     4498    +2     
=======================================
+ Hits         4182     4184    +2     
  Misses        196      196           
  Partials      118      118           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aldas aldas merged commit 492ebd7 into labstack:master Apr 1, 2026
10 checks passed
@aldas aldas deleted the golangci_conf branch April 1, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant