Repository: editorconfig-checker/editorconfig-checker
Pull request #458 (2025-04-03 18:21:03)

feat: add `.jj` (Jujutsu) directory to default exclude list
Adds Jujutsu's `.jj` directory to the default list of ignored files. [Jujutsu](https://jj-vcs.github.io/jj/latest/) (`jj`) is a version control system that maintains its metadata in a .jj directory, similar to how Git uses `.git`. Excluding this directory by default prevents accidental inclusion of VCS metadata in file operations where such files should typically be ignored.

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/editorconfig-checker/editorconfig-checker/pull/458?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=editorconfig-checker) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 87.59%. Comparing base [(`af09b21`)](https://app.codecov.io/gh/editorconfig-checker/editorconfig-checker/commit/af09b21a62b83bbc8060533f9dc8ff746c57fc6f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=editorconfig-checker) to head [(`5e80285`)](https://app.codecov.io/gh/editorconfig-checker/editorconfig-checker/commit/5e8028583950f1efb36c77920ec05c4e95035bb8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=editorconfig-checker).
> Report is 43 commits behind head on main.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main     #458      +/-   ##
==========================================
+ Coverage   86.72%   87.59%   +0.86%     
==========================================
  Files          11       11              
  Lines        1017     1048      +31     
==========================================
+ Hits          882      918      +36     
+ Misses        102       99       -3     
+ Partials       33       31       -2     
```

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/editorconfig-checker/editorconfig-checker/pull/458?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=editorconfig-checker).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=editorconfig-checker).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>

Patch:
diff --git a/README.md b/README.md
index e7afa53..7b52399 100644
--- a/README.md
+++ b/README.md
@@ -289,6 +289,7 @@ If you choose to [ignore them](#ignoring-default-excludes), these paths are excl
 
 ```txt
 "\\.git[\\/]",
+"^\\.jj/",
 "[\\/]node_modules[\\/]",
 "^\\.yarn/",
 "^yarn\\.lock$",
diff --git a/pkg/config/config.go b/pkg/config/config.go
index f632e12..095cc19 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -22,6 +22,7 @@ var DefaultExcludes = strings.Join(defaultExcludes, "|")
 // defaultExcludes are an array to produce the correct string from
 var defaultExcludes = []string{
 	"\\.git[\\/]",
+	"^\\.jj/",
 	"[\\/]node_modules[\\/]",
 	"^\\.yarn/",
 	"^yarn\\.lock$",


Test patch:
diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go
index e1fc163..b30cf95 100644
--- a/pkg/config/config_test.go
+++ b/pkg/config/config_test.go
@@ -86,7 +86,7 @@ func TestGetExcludesAsRegularExpression(t *testing.T) {
 	}
 
 	actual = c.GetExcludesAsRegularExpression()
-	expected = `testfiles|testdata|\.git[\/]|[\/]node_modules[\/]|^\.yarn/|^yarn\.lock$|^package-lock\.json$|^composer\.lock$|^Cargo\.lock$|^Gemfile\.lock$|^\.pnp\.cjs$|^\.pnp\.js$|^\.pnp\.loader\.mjs$|\.snap$|\.otf$|\.woff$|\.woff2$|\.eot$|\.ttf$|\.gif$|\.png$|\.jpg$|\.jpeg$|\.webp$|\.avif$|\.pnm$|\.pbm$|\.pgm$|\.ppm$|\.mp4$|\.wmv$|\.svg$|\.ico$|\.bak$|\.bin$|\.pdf$|\.zip$|\.gz$|\.tar$|\.7z$|\.bz2$|\.log$|\.patch$|\.css\.map$|\.js\.map$|min\.css$|min\.js$`
+	expected = `testfiles|testdata|\.git[\/]|^\.jj/|[\/]node_modules[\/]|^\.yarn/|^yarn\.lock$|^package-lock\.json$|^composer\.lock$|^Cargo\.lock$|^Gemfile\.lock$|^\.pnp\.cjs$|^\.pnp\.js$|^\.pnp\.loader\.mjs$|\.snap$|\.otf$|\.woff$|\.woff2$|\.eot$|\.ttf$|\.gif$|\.png$|\.jpg$|\.jpeg$|\.webp$|\.avif$|\.pnm$|\.pbm$|\.pgm$|\.ppm$|\.mp4$|\.wmv$|\.svg$|\.ico$|\.bak$|\.bin$|\.pdf$|\.zip$|\.gz$|\.tar$|\.7z$|\.bz2$|\.log$|\.patch$|\.css\.map$|\.js\.map$|min\.css$|min\.js$`
 
 	if actual != expected {
 		t.Errorf("expected %s, got %s", expected, actual)