Repository: editorconfig-checker/editorconfig-checker
Pull request #393 (2024-10-15 08:14:16)

chore(deps): bump github.com/gabriel-vasile/mimetype from 1.4.5 to 1.4.6
Bumps [github.com/gabriel-vasile/mimetype](https://github.com/gabriel-vasile/mimetype) from 1.4.5 to 1.4.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/gabriel-vasile/mimetype/releases">github.com/gabriel-vasile/mimetype's releases</a>.</em></p>
<blockquote>
<h2>v1.4.6</h2>
<h2>What's Changed</h2>
<ul>
<li>Improve ftyp detection in <a href="https://redirect.github.com/gabriel-vasile/mimetype/pull/564">gabriel-vasile/mimetype#564</a></li>
<li>CSV/TSV use a pool of buffered readers to avoid allocs by in <a href="https://redirect.github.com/gabriel-vasile/mimetype/pull/573">gabriel-vasile/mimetype#573</a></li>
<li>feat: Add parquet file detection by <a href="https://github.com/kwkelly"><code>@​kwkelly</code></a> in <a href="https://redirect.github.com/gabriel-vasile/mimetype/pull/578">gabriel-vasile/mimetype#578</a></li>
<li>add application/xml as alias of text/xml in <a href="https://redirect.github.com/gabriel-vasile/mimetype/pull/581">gabriel-vasile/mimetype#581</a></li>
<li>retract v1.4.4; closes <a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/575">#575</a> in <a href="https://redirect.github.com/gabriel-vasile/mimetype/pull/591">gabriel-vasile/mimetype#591</a></li>
<li>action for benchmarking detectors in <a href="https://redirect.github.com/gabriel-vasile/mimetype/pull/590">gabriel-vasile/mimetype#590</a></li>
<li>Remove GPL file by <a href="https://github.com/canadacow"><code>@​canadacow</code></a> in <a href="https://redirect.github.com/gabriel-vasile/mimetype/pull/583">gabriel-vasile/mimetype#583</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/kwkelly"><code>@​kwkelly</code></a> made their first contribution in <a href="https://redirect.github.com/gabriel-vasile/mimetype/pull/578">gabriel-vasile/mimetype#578</a></li>
<li><a href="https://github.com/canadacow"><code>@​canadacow</code></a> made their first contribution in <a href="https://redirect.github.com/gabriel-vasile/mimetype/pull/583">gabriel-vasile/mimetype#583</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/gabriel-vasile/mimetype/compare/v1.4.5...v1.4.6">https://github.com/gabriel-vasile/mimetype/compare/v1.4.5...v1.4.6</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/2998a94e1b488475165fb2c4f00d1a6d497289f7"><code>2998a94</code></a> Remove GPL test file (<a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/583">#583</a>)</li>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/8a780a5bd2725ada50150d3b95fb3e45af1c17e9"><code>8a780a5</code></a> Bump actions/checkout from 4.1.7 to 4.2.1 in the github-actions group (<a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/592">#592</a>)</li>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/458b62d9ea8613384d204a88cfe48095d8ae92e0"><code>458b62d</code></a> action for benchmarking detectors (<a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/590">#590</a>)</li>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/fd16da2849785c5272dc9a2b13b383fba7472c4e"><code>fd16da2</code></a> retract v1.4.4; closes <a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/575">#575</a>. (<a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/591">#591</a>)</li>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/3cf98ef93370a834a45eca9802b2b8027e8f702e"><code>3cf98ef</code></a> Bump golang.org/x/net in the gomod group across 1 directory (<a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/585">#585</a>)</li>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/9349e46f065717399d060eacc52006c90a5eeace"><code>9349e46</code></a> Bump the github-actions group across 1 directory with 2 updates (<a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/586">#586</a>)</li>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/7798415251b0f9fe4be7d4189c72a92955ac4e93"><code>7798415</code></a> add benchmark action that leaves comment on PR (<a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/588">#588</a>)</li>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/c6c5e4f07fd7c775d58612bed967971928d56d98"><code>c6c5e4f</code></a> Make mso detection work similar to what file/file does</li>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/c78cb113e3448227d864d9b98472fe12d11e4190"><code>c78cb11</code></a> add application/xml as alias; close <a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/227">#227</a> (<a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/581">#581</a>)</li>
<li><a href="https://github.com/gabriel-vasile/mimetype/commit/c4abedce45588ba0e51641616eabf81321b03795"><code>c4abedc</code></a> feat: Add parquet file detection (<a href="https://redirect.github.com/gabriel-vasile/mimetype/issues/578">#578</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/gabriel-vasile/mimetype/compare/v1.4.5...v1.4.6">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/gabriel-vasile/mimetype&package-manager=go_modules&previous-version=1.4.5&new-version=1.4.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/.ecrc b/.ecrc
deleted file mode 100644
index 1a3dedd..0000000
--- a/.ecrc
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-  "Version": "v3.0.3",
-  "Verbose": false,
-  "Debug": false,
-  "IgnoreDefaults": false,
-  "SpacesAfterTabs": false,
-  "NoColor": false,
-  "exclude": [
-    "testfiles",
-    "testdata"
-  ],
-  "AllowedContentTypes": [],
-  "PassedFiles": [],
-  "Disable": {
-    "EndOfLine": false,
-    "Indentation": false,
-    "InsertFinalNewline": false,
-    "TrimTrailingWhitespace": false,
-    "IndentSize": false,
-    "MaxLineLength": false
-  }
-}
diff --git a/.editorconfig-checker.json b/.editorconfig-checker.json
new file mode 100644
index 0000000..139cdc6
--- /dev/null
+++ b/.editorconfig-checker.json
@@ -0,0 +1,22 @@
+{
+    "Version": "v3.0.3",
+    "Verbose": false,
+    "Debug": false,
+    "IgnoreDefaults": false,
+    "SpacesAfterTabs": false,
+    "NoColor": false,
+    "exclude": [
+        "testfiles",
+        "testdata"
+    ],
+    "AllowedContentTypes": [],
+    "PassedFiles": [],
+    "Disable": {
+        "EndOfLine": false,
+        "Indentation": false,
+        "InsertFinalNewline": false,
+        "TrimTrailingWhitespace": false,
+        "IndentSize": false,
+        "MaxLineLength": false
+    }
+}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bdfce82..1c173f9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -9,9 +9,16 @@ repos:
           - commit-msg
         args: []
   - repo: https://github.com/pre-commit/pre-commit.git
-    rev: v3.8.0
+    rev: v4.0.1
     hooks:
       - id: validate_manifest
+  - repo: https://github.com/editorconfig-checker/editorconfig-checker
+    # after next release: replace with the newly created tag
+    rev: 10f16fc843581773830f0cbf3a3f8c285ee1edc3
+    hooks:
+      - id: editorconfig-checker
+        stages:
+          - pre-commit
   - repo: local
     hooks:
       - id: pass-tests
diff --git a/README.md b/README.md
index de85d94..97b739e 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
 
 [![ci](https://github.com/editorconfig-checker/editorconfig-checker/actions/workflows/ci.yml/badge.svg)](https://github.com/editorconfig-checker/editorconfig-checker/actions/workflows/ci.yml)
 [![codecov](https://codecov.io/gh/editorconfig-checker/editorconfig-checker/branch/main/graph/badge.svg)](https://codecov.io/gh/editorconfig-checker/editorconfig-checker)
-[![Hits-of-Code](https://hitsofcode.com/github/editorconfig-checker/editorconfig-checker)](https://hitsofcode.com/view/github/editorconfig-checker/editorconfig-checker)
+[![Hits-of-Code](https://hitsofcode.com/github/editorconfig-checker/editorconfig-checker?branch=main&label=Hits-of-Code)](https://hitsofcode.com/github/editorconfig-checker/editorconfig-checker/view?branch=main&label=Hits-of-Code)
 [![Go Report Card](https://goreportcard.com/badge/github.com/editorconfig-checker/editorconfig-checker/v3)](https://goreportcard.com/report/github.com/editorconfig-checker/editorconfig-checker/v3)
 
 ![Logo](docs/logo.png)
diff --git a/go.mod b/go.mod
index 9ec1afc..5c0f41e 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.21
 require (
 	github.com/baulk/chardet v0.1.0
 	github.com/editorconfig/editorconfig-core-go/v2 v2.6.2
-	github.com/gabriel-vasile/mimetype v1.4.5
+	github.com/gabriel-vasile/mimetype v1.4.6
 	golang.org/x/text v0.19.0
 )
 
@@ -27,7 +27,7 @@ require (
 	github.com/gkampitakis/go-snaps v0.5.7
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	golang.org/x/mod v0.17.0 // indirect
-	golang.org/x/net v0.27.0 // indirect
+	golang.org/x/net v0.30.0 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 )
diff --git a/go.sum b/go.sum
index a0c824a..a3bade7 100644
--- a/go.sum
+++ b/go.sum
@@ -5,8 +5,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/editorconfig/editorconfig-core-go/v2 v2.6.2 h1:dKG8sc7n321deIVRcQtwlMNoBEra7j0qQ8RwxO8RN0w=
 github.com/editorconfig/editorconfig-core-go/v2 v2.6.2/go.mod h1:7dvD3GCm7eBw53xZ/lsiq72LqobdMg3ITbMBxnmJmqY=
-github.com/gabriel-vasile/mimetype v1.4.5 h1:J7wGKdGu33ocBOhGy0z653k/lFKLFDPJMG8Gql0kxn4=
-github.com/gabriel-vasile/mimetype v1.4.5/go.mod h1:ibHel+/kbxn9x2407k1izTA1S81ku1z/DlgOW2QE0M4=
+github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc=
+github.com/gabriel-vasile/mimetype v1.4.6/go.mod h1:JX1qVKqZd40hUPpAfiNTe0Sne7hdfKSbOqqmkq8GCXc=
 github.com/gkampitakis/ciinfo v0.3.0 h1:gWZlOC2+RYYttL0hBqcoQhM7h1qNkVqvRCV1fOvpAv8=
 github.com/gkampitakis/ciinfo v0.3.0/go.mod h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo=
 github.com/gkampitakis/go-diff v1.3.2 h1:Qyn0J9XJSDTgnsgHRdz9Zp24RaJeKMUHg2+PDZZdC4M=
@@ -41,8 +41,8 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
 github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
 golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
 golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
-golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
-golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
+golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
+golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
 golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
 golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=


Test patch:
diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go
index abbd970..38ec47a 100644
--- a/pkg/config/config_test.go
+++ b/pkg/config/config_test.go
@@ -8,8 +8,8 @@ import (
 	"testing"
 )
 
-var rootConfigFilePath = []string{"../../.ecrc"}
-var configWithIgnoredDefaults = []string{"../../testfiles/.ecrc"}
+var rootConfigFilePath = []string{"../../.editorconfig-checker.json"}
+var configWithIgnoredDefaults = []string{"../../testfiles/.editorconfig-checker.json"}
 
 func TestNewConfig(t *testing.T) {
 	actual, _ := NewConfig([]string{"abc"})
@@ -89,7 +89,7 @@ func TestGetExcludesAsRegularExpression(t *testing.T) {
 }
 
 func TestMerge(t *testing.T) {
-	c1, err := NewConfig([]string{"../../.ecrc"})
+	c1, err := NewConfig([]string{"../../.editorconfig-checker.json"})
 	if err != nil {
 		t.Errorf("Expected to create a config without errors, got %v", err)
 	}
@@ -102,7 +102,7 @@ func TestMerge(t *testing.T) {
 	mergeConfig := Config{}
 	c1.Merge(mergeConfig)
 
-	c2, _ := NewConfig([]string{"../../.ecrc"})
+	c2, _ := NewConfig([]string{"../../.editorconfig-checker.json"})
 	_ = c2.Parse()
 
 	if !reflect.DeepEqual(c1, c2) {
@@ -151,14 +151,14 @@ func TestMerge(t *testing.T) {
 		t.Errorf("Expected, got %#v and %#v", c1, &expected)
 	}
 
-	config := Config{Path: "./.ecrc"}
+	config := Config{Path: "./.editorconfig-checker.json"}
 	err = config.Parse()
 
 	if err == nil {
 		t.Errorf("Expected an error to happen when parsing an unexisting file, got %v", err)
 	}
 
-	config = Config{Path: "./../../testfiles/.malformed.ecrc"}
+	config = Config{Path: "./../../testfiles/.malformed.editorconfig-checker.json"}
 	err = config.Parse()
 
 	if err == nil {
@@ -167,7 +167,7 @@ func TestMerge(t *testing.T) {
 }
 
 func TestParse(t *testing.T) {
-	c, _ := NewConfig([]string{"../../testfiles/.ecrc"})
+	c, _ := NewConfig([]string{"../../testfiles/.editorconfig-checker.json"})
 	_ = c.Parse()
 
 	if c.Verbose != true ||
@@ -200,11 +200,11 @@ func TestSave(t *testing.T) {
 }
 
 func TestGetAsString(t *testing.T) {
-	c, _ := NewConfig([]string{"../../.ecrc"})
+	c, _ := NewConfig([]string{"../../.editorconfig-checker.json"})
 	_ = c.Parse()
 
 	actual := c.GetAsString()
-	expected := "Config: {ShowVersion:false Help:false DryRun:false Path:../../.ecrc Version:v3.0.3 Verbose:false Format: Debug:false IgnoreDefaults:false SpacesAftertabs:<nil> SpacesAfterTabs:false NoColor:false Exclude:[testfiles testdata] AllowedContentTypes:[text/ application/octet-stream application/ecmascript application/json application/x-ndjson application/xml +json +xml] PassedFiles:[] Disable:{EndOfLine:false Indentation:false InsertFinalNewline:false TrimTrailingWhitespace:false IndentSize:false MaxLineLength:false} Logger:{Verbosee:false Debugg:false NoColor:false} EditorconfigConfig:0x"
+	expected := "Config: {ShowVersion:false Help:false DryRun:false Path:../../.editorconfig-checker.json Version:v3.0.3 Verbose:false Format: Debug:false IgnoreDefaults:false SpacesAftertabs:<nil> SpacesAfterTabs:false NoColor:false Exclude:[testfiles testdata] AllowedContentTypes:[text/ application/octet-stream application/ecmascript application/json application/x-ndjson application/xml +json +xml] PassedFiles:[] Disable:{EndOfLine:false Indentation:false InsertFinalNewline:false TrimTrailingWhitespace:false IndentSize:false MaxLineLength:false} Logger:{Verbosee:false Debugg:false NoColor:false} EditorconfigConfig:0x"
 
 	if !strings.HasPrefix(actual, expected) {
 		t.Errorf("Expected: %v, got: %v ", expected, actual)