1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

Run var-naming on test files

This commit is contained in:
mgechev
2018-05-30 17:41:02 -07:00
parent 9e52d7ffdd
commit 55145d7427
2 changed files with 2 additions and 5 deletions

View File

@@ -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/

View File

@@ -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,