mirror of
https://github.com/mgechev/revive.git
synced 2024-11-24 08:32:22 +02:00
Run var-naming on test files
This commit is contained in:
parent
9e52d7ffdd
commit
55145d7427
@ -12,7 +12,8 @@ import (
|
||||
|
||||
import "C"
|
||||
|
||||
var var_name int // MATCH /don't use underscores in Go names; var var_name should be varName/
|
||||
var safeUrl = "HttPS://..iaMHost..Test:443/paTh^A%ef//./%41PaTH/..//?" // MATCH /var safeUrl should be safeURL/
|
||||
var var_name int // MATCH /don't use underscores in Go names; var var_name should be varName/
|
||||
|
||||
type t_wow struct { // MATCH /don't use underscores in Go names; type t_wow should be tWow/
|
||||
x_damn int // MATCH /don't use underscores in Go names; struct field x_damn should be xDamn/
|
||||
|
@ -16,10 +16,6 @@ type VarNamingRule struct{}
|
||||
func (r *VarNamingRule) Apply(file *lint.File, arguments lint.Arguments) []lint.Failure {
|
||||
var failures []lint.Failure
|
||||
|
||||
if isTest(file) {
|
||||
return failures
|
||||
}
|
||||
|
||||
fileAst := file.AST
|
||||
walker := lintNames{
|
||||
file: file,
|
||||
|
Loading…
Reference in New Issue
Block a user