Skip to content

Commit

Permalink
* check globs excludes in no-cyrillic linter
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan.Makeev <ivan.makeev@flant.com>
  • Loading branch information
Ranger-X committed Nov 22, 2024
1 parent 8ad894d commit 7b8d2bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ linters-settings:
no-cyrillic-file-excludes:
- user-authz:/rbac.yaml
- documentation:/images/web/site/_data/topnav.yml
- other-module:/external/**/*.txt
license:
copyright-excludes:
- upmeter:/images/upmeter/stress.sh
Expand Down
2 changes: 1 addition & 1 deletion pkg/linters/no-cyrillic/no-cyrillic.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (o *NoCyrillic) Run(m *module.Module) (errors.LintRuleErrorsList, error) {
for _, fileName := range files {
name, _ := strings.CutPrefix(fileName, m.GetPath())
name = m.GetName() + ":" + name
if slices.Contains(o.cfg.NoCyrillicFileExcludes, name) {
if fsutils.FileNameMatchAnyMask(name, o.cfg.NoCyrillicFileExcludes) {
continue
}
if o.skipDocRe.MatchString(fileName) {
Expand Down

0 comments on commit 7b8d2bf

Please sign in to comment.