Skip to content

Commit

Permalink
exclude .git from copyright linter (#33359)
Browse files Browse the repository at this point in the history
When doing the copyright linting we collect all files matching *.go. If a branch is named with a name ending with .go, like NDMII-3313-integration-metric-stats.go you end up with a file .git/logs/refs/remotes/origin/NDMII-3313-integration-metric-stats.go that we are trying to lint. This PR exclude the .git folder from the linter.

(cherry picked from commit 7b0a606)
  • Loading branch information
paulcacheux authored and github-actions[bot] committed Jan 24, 2025
1 parent 882966f commit 3d41c5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tasks/libs/types/copyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

# These path patterns are excluded from checks
PATH_EXCLUSION_REGEX = [
# Git internal folder
'/.git/',
# These are auto-generated files but without headers to indicate it
'/vendor/',
'/pkg/clusteragent/autoscaling/custommetrics/api/generated/',
Expand Down

0 comments on commit 3d41c5a

Please sign in to comment.