1
0
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:
mgechev 2018-05-30 17:41:02 -07:00
parent 9e52d7ffdd
commit 55145d7427
No known key found for this signature in database
GPG Key ID: 3C44F5A2A289C6BB
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,