Skip to content

Commit 0f51c33

Browse files
committed
add testdata for promlinter
Signed-off-by: yeya24 <[email protected]>
1 parent 4d209bc commit 0f51c33

File tree

7 files changed

+1057
-4
lines changed

7 files changed

+1057
-4
lines changed

.golangci.example.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,20 @@ linters-settings:
347347
simple: true
348348
range-loops: true # Report preallocation suggestions on range loops, true by default
349349
for-loops: false # Report preallocation suggestions on for loops, false by default
350+
promlinter:
351+
# Promlinter cannot infer all metrics name in static analysis. Enable strict mode
352+
# will also include the errors caused by failing to parse the args.
353+
strict: false
354+
disabled-linters:
355+
# Please refer to https://github.com/yeya24/promlinter#usage for detailed usage.
356+
# - "Help"
357+
# - "MetricUnits"
358+
# - "Counter"
359+
# - "HistogramSummaryReserved"
360+
# - "MetricTypeInName"
361+
# - "ReservedChars"
362+
# - "CamelCase"
363+
# - "lintUnitAbbreviations"
350364
predeclared:
351365
# comma-separated list of predeclared identifiers to not report on
352366
ignore: ""

go.mod

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
module github.com/golangci/golangci-lint
2+
3+
go 1.14
4+
5+
require (
6+
4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a
7+
github.com/BurntSushi/toml v0.3.1
8+
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24
9+
github.com/OpenPeeDeeP/depguard v1.0.1
10+
github.com/alexkohler/prealloc v1.0.0
11+
github.com/ashanbrown/forbidigo v1.1.0
12+
github.com/ashanbrown/makezero v0.0.0-20210308000810-4155955488a0
13+
github.com/bkielbasa/cyclop v1.2.0
14+
github.com/bombsimon/wsl/v3 v3.2.0
15+
github.com/charithe/durationcheck v0.0.6
16+
github.com/daixiang0/gci v0.2.8
17+
github.com/denis-tingajkin/go-header v0.4.2
18+
github.com/esimonov/ifshort v1.0.2
19+
github.com/fatih/color v1.10.0
20+
github.com/fzipp/gocyclo v0.3.1
21+
github.com/go-critic/go-critic v0.5.5
22+
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b
23+
github.com/gofrs/flock v0.8.0
24+
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
25+
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
26+
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613
27+
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a
28+
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0
29+
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
30+
github.com/golangci/misspell v0.3.5
31+
github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5
32+
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
33+
github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254
34+
github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5
35+
github.com/gostaticanalysis/nilerr v0.1.1
36+
github.com/hashicorp/go-multierror v1.0.0
37+
github.com/jgautheron/goconst v1.4.0
38+
github.com/jingyugao/rowserrcheck v0.0.0-20210315055705-d907ca737bb1
39+
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af
40+
github.com/julz/importas v0.0.0-20210228071311-d0bf5cb4e1db
41+
github.com/kisielk/errcheck v1.6.0
42+
github.com/kulti/thelper v0.4.0
43+
github.com/kunwardeep/paralleltest v1.0.2
44+
github.com/kyoh86/exportloopref v0.1.8
45+
github.com/ldez/gomoddirectives v0.2.1
46+
github.com/maratori/testpackage v1.0.1
47+
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // v1.0
48+
github.com/mattn/go-colorable v0.1.8
49+
github.com/mbilski/exhaustivestruct v1.2.0
50+
github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81
51+
github.com/mgechev/revive v1.0.5
52+
github.com/mitchellh/go-homedir v1.1.0
53+
github.com/mitchellh/go-ps v1.0.0
54+
github.com/moricho/tparallel v0.2.1
55+
github.com/nakabonne/nestif v0.3.0
56+
github.com/nishanths/exhaustive v0.1.0
57+
github.com/nishanths/predeclared v0.2.1
58+
github.com/pkg/errors v0.9.1
59+
github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f
60+
github.com/ryancurrah/gomodguard v1.2.0
61+
github.com/ryanrolds/sqlclosecheck v0.3.0
62+
github.com/sanposhiho/wastedassign v0.2.0
63+
github.com/securego/gosec/v2 v2.7.0
64+
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
65+
github.com/shirou/gopsutil/v3 v3.21.2
66+
github.com/sirupsen/logrus v1.8.1
67+
github.com/sonatard/noctx v0.0.1
68+
github.com/sourcegraph/go-diff v0.6.1
69+
github.com/spf13/cobra v1.1.3
70+
github.com/spf13/pflag v1.0.5
71+
github.com/spf13/viper v1.7.1
72+
github.com/ssgreg/nlreturn/v2 v2.1.0
73+
github.com/stretchr/testify v1.7.0
74+
github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b
75+
github.com/tetafro/godot v1.4.4
76+
github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94
77+
github.com/tomarrell/wrapcheck v1.0.0
78+
github.com/tommy-muehle/go-mnd/v2 v2.3.1
79+
github.com/ultraware/funlen v0.0.3
80+
github.com/ultraware/whitespace v0.0.4
81+
github.com/uudashr/gocognit v1.0.1
82+
github.com/valyala/quicktemplate v1.6.3
83+
github.com/yeya24/promlinter v0.0.0-20210328235706-000c7d74ddb3
84+
golang.org/x/tools v0.1.0
85+
gopkg.in/yaml.v2 v2.4.0
86+
honnef.co/go/tools v0.1.3
87+
mvdan.cc/gofumpt v0.1.1
88+
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
89+
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
90+
mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7
91+
)

0 commit comments

Comments
 (0)