Skip to content

Commit

Permalink
Make linter happy again
Browse files Browse the repository at this point in the history
  • Loading branch information
jwkohnen committed Sep 4, 2024
1 parent 7e77c6c commit 5fde74c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.59.1
version: v1.60.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ linters:
- dogsled
- dupl
- errcheck
- exportloopref
# - copyloopvar
- funlen
- gochecknoinits
- goconst
Expand Down Expand Up @@ -40,7 +40,7 @@ linters:
- testpackage
- revive
- wsl
- gomnd
- mnd

linters-settings:
lll:
Expand All @@ -50,7 +50,7 @@ linters-settings:
statements: 50
goimports:
local-prefixes: github.com/jwkohnen/conntrack-stats-exporter
gomnd:
mnd:
ignored-numbers:
- '0'
- '1'
Expand Down
4 changes: 2 additions & 2 deletions exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ func (e *exporter) gatherMetricsForNetNs(ctx context.Context, netns string, metr

metrics.GetOrInit(e.cfg.prefix, "counter", metricShortName).AddSample(
internal.Labels{
{
internal.Label{
Key: "cpu",
Value: string(cpu),
},
{
internal.Label{
Key: "netns",
Value: netns,
},
Expand Down
3 changes: 3 additions & 0 deletions exporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ func TestScrapeError(t *testing.T) {
timings[i] = time.Since(start)
}()
}

wg.Wait()

t.Logf("timing median: %v", median(timings))
Expand Down Expand Up @@ -311,6 +312,7 @@ func TestScrapeError(t *testing.T) {
timings[i] = time.Since(start)
}()
}

wg.Wait()

t.Logf("timing median: %v", median(timings))
Expand Down Expand Up @@ -356,6 +358,7 @@ func TestScrapeError(t *testing.T) {
timings[i] = time.Since(start)
}()
}

wg.Wait()

t.Logf("timing median: %v", median(timings))
Expand Down

0 comments on commit 5fde74c

Please sign in to comment.