Skip to content

Commit 6afc174

Browse files
add test default_exclude
1 parent 31ee215 commit 6afc174

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
issues:
2+
include:
3+
- EXC0011 # include issues about comments from `stylecheck`

test/testdata/default_exclude.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//args: -Estylecheck,golint
2+
//config_path: testdata/configs/default_exclude.yml
3+
4+
/*Package testdata ...*/
5+
package testdata
6+
7+
// InvalidFuncComment, both golint and stylecheck will complain about this, // ERROR `ST1020: comment on exported function ExportedFunc1 should be of the form "ExportedFunc1 ..."`
8+
// if include EXC0011, only the warning from golint will be ignored.
9+
// And only the warning from stylecheck will start with "ST1020".
10+
func ExportedFunc1() {
11+
}
12+
13+
// InvalidFuncComment // ERROR `ST1020: comment on exported function ExportedFunc2 should be of the form "ExportedFunc2 ..."`
14+
// nolint:golint
15+
func ExportedFunc2() {
16+
}
17+
18+
// nolint:stylecheck
19+
func IgnoreAll() {
20+
}

0 commit comments

Comments
 (0)