Skip to content

Commit

Permalink
Ignore node_modules subdirectories (#109)
Browse files Browse the repository at this point in the history
This adjusts the default ignore pattern for node_modules to include subdirectories when checking for headers. This is necessary because the node_modules directory is sometimes nested within other directories, and the current pattern only matches the top-level node_modules directory.

This really only affects interactive use, as node_modules directories are not usally committed to version control.
  • Loading branch information
jpogran authored Jun 24, 2024
1 parent 69677b0 commit c9d57fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ config, see the "copywrite init" command.`,
autoSkippedPatterns := []string{
".github/workflows/**",
".github/dependabot.yml",
"**node_modules/**",
"**/node_modules/**",
}
ignoredPatterns := lo.Union(conf.Project.HeaderIgnore, autoSkippedPatterns)

Expand Down

0 comments on commit c9d57fb

Please sign in to comment.