From 3e33af6a9a1b51b65a79a47033fefa3abf5aecd4 Mon Sep 17 00:00:00 2001 From: Marcin Federowicz Date: Tue, 3 Oct 2023 01:22:28 +0200 Subject: [PATCH] cleanup code - comments and var names --- cli/main.go | 3 ++- lint/config.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cli/main.go b/cli/main.go index 1ddc8697c..38a75f4a9 100644 --- a/cli/main.go +++ b/cli/main.go @@ -21,7 +21,8 @@ var ( commit = "none" date = "unknown" builtBy = "unknown" - AppFs = afero.NewOsFs() + //used to operations (checking path etc) related with user config files + AppFs = afero.NewOsFs() ) func fail(err string) { diff --git a/lint/config.go b/lint/config.go index b0ccd8728..7e51a93c2 100644 --- a/lint/config.go +++ b/lint/config.go @@ -33,8 +33,8 @@ func (rc *RuleConfig) Initialize() error { type RulesConfig = map[string]RuleConfig // MustExclude - checks if given filename `name` must be excluded -func (rcfg *RuleConfig) MustExclude(name string) bool { - for _, exclude := range rcfg.excludeFilters { +func (rc *RuleConfig) MustExclude(name string) bool { + for _, exclude := range rc.excludeFilters { if exclude.MatchFileName(name) { return true }