mirror of
https://github.com/mgechev/revive.git
synced 2025-01-24 03:47:45 +02:00
adds multifile test
This commit is contained in:
parent
97315129a9
commit
4f2e0613fc
@ -11,7 +11,7 @@ func (t foo) aFoo() {
|
||||
|
||||
|
||||
|
||||
func (t *foo) AFoo() { // MATCH /Method 'AFoo' differs only by capitalization to method 'aFoo'/
|
||||
func (t *foo) AFoo() { // MATCH /Method 'AFoo' differs only by capitalization to other method of 'pkg/foo'/
|
||||
return
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ func aGlobal(){
|
||||
|
||||
}
|
||||
|
||||
func AGlobal(){ // MATCH /Method 'AGlobal' differs only by capitalization to method 'aGlobal'/
|
||||
func AGlobal(){ // MATCH /Function 'AGlobal' differs only by capitalization to other function/
|
||||
}
|
||||
|
||||
func ABar() { // Should not warn
|
||||
@ -46,6 +46,6 @@ func (t foo) ABar() { // Should not warn
|
||||
return
|
||||
}
|
||||
|
||||
func (t bar) ABar() { // MATCH /Method 'ABar' differs only by capitalization to method 'aBar'/
|
||||
func (t bar) ABar() { // MATCH /Method 'ABar' differs only by capitalization to other method of 'pkg/bar'/
|
||||
return
|
||||
}
|
8
fixtures/confusing-naming2.go
Normal file
8
fixtures/confusing-naming2.go
Normal file
@ -0,0 +1,8 @@
|
||||
// Test of confusing-naming rule.
|
||||
|
||||
// Package pkg ...
|
||||
package pkg
|
||||
|
||||
|
||||
func aglobal(){ // MATCH /Function 'aglobal' differs only by capitalization to other function/
|
||||
}
|
@ -8,5 +8,7 @@ import (
|
||||
|
||||
// TestConfusingNaming rule.
|
||||
func TestConfusingNaming(t *testing.T) {
|
||||
testRule(t, "confusing-naming", &rule.ConfusingNamingRule{})
|
||||
testRule(t, "confusing-naming1", &rule.ConfusingNamingRule{})
|
||||
|
||||
testRule(t, "confusing-naming2", &rule.ConfusingNamingRule{})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user