Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package editorconfig-checker for
openSUSE:Factory checked in at 2026-05-28 17:33:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/editorconfig-checker (Old)
and /work/SRC/openSUSE:Factory/.editorconfig-checker.new.1937 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "editorconfig-checker"
Thu May 28 17:33:02 2026 rev:12 rq:1355601 version:3.7.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/editorconfig-checker/editorconfig-checker.changes
2026-01-30 18:27:19.438239185 +0100
+++
/work/SRC/openSUSE:Factory/.editorconfig-checker.new.1937/editorconfig-checker.changes
2026-05-28 17:33:11.535241211 +0200
@@ -1,0 +2,26 @@
+Thu May 28 08:10:57 UTC 2026 - Johannes Kastl
<[email protected]>
+
+- Update to version 3.7.0:
+ * Features
+ - files: expand glob patterns in passed-file args (#190) (#558)
+ (4c0f326)
+ * Bug Fixes
+ - cli: auto-enable no-color when output format is
+ github-actions (#557) (9f4014c)
+ - detect binary files before decoding to prevent false text
+ (#550) (f47b30c)
+ * Dependencies
+ - chore(deps): bump github.com/gkampitakis/go-snaps from 0.5.21
+ to 0.5.22 (#564)
+ - chore(deps): bump golang.org/x/text from 0.36.0 to 0.37.0
+ (#562)
+ - chore(deps): bump github.com/wlynxg/chardet from 1.0.4 to
+ 1.0.5 (#561)
+ - chore(deps): bump googleapis/release-please-action from 4 to
+ 5 (#559)
+ - chore(deps): bump golang.org/x/text from 0.35.0 to 0.36.0
+ (#555)
+ - chore(deps): bump dependabot/fetch-metadata from 2 to 3
+ (#554)
+
+-------------------------------------------------------------------
Old:
----
editorconfig-checker-3.6.1.obscpio
New:
----
editorconfig-checker-3.7.0.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ editorconfig-checker.spec ++++++
--- /var/tmp/diff_new_pack.aG5Z6V/_old 2026-05-28 17:33:13.235311430 +0200
+++ /var/tmp/diff_new_pack.aG5Z6V/_new 2026-05-28 17:33:13.235311430 +0200
@@ -19,7 +19,7 @@
%define executable_name ec
Name: editorconfig-checker
-Version: 3.6.1
+Version: 3.7.0
Release: 0
Summary: Tool to verify that your files are in harmony with your
.editorconfig
License: MIT
++++++ _service ++++++
--- /var/tmp/diff_new_pack.aG5Z6V/_old 2026-05-28 17:33:13.295313908 +0200
+++ /var/tmp/diff_new_pack.aG5Z6V/_new 2026-05-28 17:33:13.299314074 +0200
@@ -1,9 +1,9 @@
<services>
<service name="obs_scm" mode="manual">
- <param
name="url">https://github.com/editorconfig-checker/editorconfig-checker</param>
+ <param
name="url">https://github.com/editorconfig-checker/editorconfig-checker.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
- <param name="revision">v3.6.1</param>
+ <param name="revision">refs/tags/v3.7.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="changesgenerate">enable</param>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.aG5Z6V/_old 2026-05-28 17:33:13.335315560 +0200
+++ /var/tmp/diff_new_pack.aG5Z6V/_new 2026-05-28 17:33:13.343315891 +0200
@@ -1,6 +1,8 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/editorconfig-checker/editorconfig-checker</param>
- <param
name="changesrevision">aa06cea887b26f372f9368aa53665266ec6dc364</param></service></servicedata>
+ <param
name="changesrevision">aa06cea887b26f372f9368aa53665266ec6dc364</param></service><service
name="tar_scm">
+ <param
name="url">https://github.com/editorconfig-checker/editorconfig-checker.git</param>
+ <param
name="changesrevision">03db2cca9a525b3831377be1e4696c06fdfef07a</param></service></servicedata>
(No newline at EOF)
++++++ editorconfig-checker-3.6.1.obscpio -> editorconfig-checker-3.7.0.obscpio
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/editorconfig-checker-3.6.1/.release-please-manifest.json
new/editorconfig-checker-3.7.0/.release-please-manifest.json
--- old/editorconfig-checker-3.6.1/.release-please-manifest.json
2026-01-28 21:45:37.000000000 +0100
+++ new/editorconfig-checker-3.7.0/.release-please-manifest.json
2026-05-25 19:18:48.000000000 +0200
@@ -1,3 +1,3 @@
{
- ".": "3.6.1"
+ ".": "3.7.0"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/CHANGELOG.md
new/editorconfig-checker-3.7.0/CHANGELOG.md
--- old/editorconfig-checker-3.6.1/CHANGELOG.md 2026-01-28 21:45:37.000000000
+0100
+++ new/editorconfig-checker-3.7.0/CHANGELOG.md 2026-05-25 19:18:48.000000000
+0200
@@ -1,5 +1,18 @@
# Changelog
+##
[3.7.0](https://github.com/editorconfig-checker/editorconfig-checker/compare/v3.6.1...v3.7.0)
(2026-05-25)
+
+
+### Features
+
+* **files:** expand glob patterns in passed-file args
([#190](https://github.com/editorconfig-checker/editorconfig-checker/issues/190))
([#558](https://github.com/editorconfig-checker/editorconfig-checker/issues/558))
([4c0f326](https://github.com/editorconfig-checker/editorconfig-checker/commit/4c0f326cfa71fb0dd80c0c71b1844b2550ed799e))
+
+
+### Bug Fixes
+
+* **cli:** auto-enable no-color when output format is github-actions
([#557](https://github.com/editorconfig-checker/editorconfig-checker/issues/557))
([9f4014c](https://github.com/editorconfig-checker/editorconfig-checker/commit/9f4014ce0944f601472e5cbfaec31f711890c780))
+* detect binary files before decoding to prevent false text
([#550](https://github.com/editorconfig-checker/editorconfig-checker/issues/550))
([f47b30c](https://github.com/editorconfig-checker/editorconfig-checker/commit/f47b30c96713107bc4fe0b7a05e79a293c4874dd))
+
##
[3.6.1](https://github.com/editorconfig-checker/editorconfig-checker/compare/v3.6.0...v3.6.1)
(2026-01-22)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/README.md
new/editorconfig-checker-3.7.0/README.md
--- old/editorconfig-checker-3.6.1/README.md 2026-01-28 21:45:37.000000000
+0100
+++ new/editorconfig-checker-3.7.0/README.md 2026-05-25 19:18:48.000000000
+0200
@@ -59,7 +59,7 @@
<!-- x-release-please-start-version -->
```shell
-VERSION="v3.6.1"
+VERSION="v3.7.0"
OS="linux"
ARCH="amd64"
curl -O -L -C -
https://github.com/editorconfig-checker/editorconfig-checker/releases/download/$VERSION/ec-$OS-$ARCH.tar.gz
&& \
@@ -139,25 +139,36 @@
paru -S editorconfig-checker-git
```
-### Language Specific Wrappers:
+### Language Specific Wrappers
We do have a couple of language specific wrappers available that you can
install with your favorites language package manager.
See their respective documentation for installation and usage instructions.
-* JavaScript/TypeScript: [npm
package](https://www.npmjs.com/package/editorconfig-checker)
-* Python: [PyPI package](https://pypi.org/project/editorconfig-checker/)
-* PHP: [Composer
package](https://packagist.org/packages/editorconfig-checker/editorconfig-checker)
+- JavaScript/TypeScript: [npm
package](https://www.npmjs.com/package/editorconfig-checker)
+- Python: [PyPI package](https://pypi.org/project/editorconfig-checker/)
+- PHP: [Composer
package](https://packagist.org/packages/editorconfig-checker/editorconfig-checker)
## Usage
```txt
USAGE:
+ editorconfig-checker [OPTIONS] [FILE...]
+
+With no FILE arguments, all files tracked by git are checked. When one or
+more FILE arguments are given, only those files are checked (the configured
+exclude patterns still apply).
+
+OPTIONS:
+ -color
+ enables printing color
-config string
config
+ -cpuprofile string
+ write cpu profile to file
-debug
print debugging information
-disable-charset
- disables the charset check
+ disables only the charset check
-disable-end-of-line
disables the trailing whitespace check
-disable-indent-size
@@ -166,15 +177,19 @@
disables the indentation check
-disable-insert-final-newline
disables the final newline check
+ -disable-max-line-length
+ disables only the max-line-length check
-disable-trim-trailing-whitespace
disables the trailing whitespace check
-dry-run
show which files would be checked
-exclude string
- a regex which files should be excluded from checking - needs to be a
valid regular expression
- -format
- specifies the output format, see "Formats" below for more information
- -h print the help
+ a regex which files should be excluded from checking - needs to be a
valid regular expression. Combine patterns with | (pipe): -exclude
"vendor|testdata"
+ -f value
+ specify the output format: default, codeclimate, gcc, github-actions
(default default)
+ -format value
+ specify the output format: default, codeclimate, gcc, github-actions
(default default)
+ -h print the help
-help
print the help
-ignore-defaults
@@ -183,9 +198,7 @@
creates an initial configuration
-no-color
disables printing color
- -color
- enables printing color
- -v print debugging information
+ -v print debugging information
-verbose
print debugging information
-version
@@ -259,6 +272,21 @@
}
```
+### Configuration Keys
+
+| Key | Type | Default | Description |
+| --- | --- | --- | --- |
+| `Verbose` | bool | `false` | Print verbose output during checking |
+| `Debug` | bool | `false` | Print debugging information |
+| `IgnoreDefaults` | bool | `false` | Ignore the default exclude patterns |
+| `SpacesAfterTabs` | bool | `false` | Allow spaces after tabs in indentation
(mixed indentation). When `false`, spaces following tabs are flagged as errors |
+| `NoColor` | bool | `false` | Disable colored output |
+| `Exclude` | string[] | `[]` | Regular expressions for files to exclude from
checking |
+| `AllowedContentTypes` | string[] | `[]` | Additional content types to check
(added to the defaults listed below) |
+| `PassedFiles` | string[] | `[]` | Explicit list of files, directories, or
shell-style glob patterns (e.g. `src/*.go`) to check. When set, only these
paths are checked instead of auto-discovering files from the working directory
or git. Glob patterns that don't match any file are left as-is so a subsequent
content-type check surfaces the missing path |
+| `Version` | string | `""` | When set, the tool verifies this value matches
the binary version and exits with an error if they differ. Useful for pinning a
specific version in CI |
+| `Disable` | object | | Selectively disable individual checks (see below) |
+
You can set any of the options under the `"Disable"` section to `true` to
disable those particular checks.
You could also specify command line arguments, and they will get merged with
the configuration file. The command line arguments have a higher precedence
than the configuration.
@@ -321,6 +349,20 @@
- adding a regex matching the path to the [configuration file](#configuration)
- passing a regex matching the path as argument to `--exclude`
+The `--exclude` flag accepts a single regular expression. To exclude multiple
patterns, combine them using `|` (regex alternation):
+
+```bash
+editorconfig-checker --exclude "vendor|testdata|\.min\.js$"
+```
+
+In a configuration file, you can list each pattern as a separate entry in the
`Exclude` array instead:
+
+```json
+{
+ "Exclude": ["vendor", "testdata", "\\.min\\.js$"]
+}
+```
+
All these excludes are used in addition to the [default
excludes](#default-excludes), unless you [opt out of
them](#ignoring-default-excludes).
If you want to see which files would be checked without checking them you can
pass the `--dry-run` flag.
@@ -343,7 +385,7 @@
#### Default Excludes
-If you choose to [ignore them](#ignoring-default-excludes), these paths are
excluded automatically:
+Unless you choose to [ignore them](#ignoring-default-excludes), these paths
are excluded automatically:
```txt
// source control related files and folders
@@ -382,6 +424,8 @@
"\\.terraform\\.lock\\.hcl$",
// uv (Python)
"uv\\.lock$",
+// Buf (Protobuf)
+"buf\\.lock$",
// yarn (NodeJS)
"\\.pnp\\.c?js$",
"\\.pnp\\.loader\\.mjs$",
@@ -492,7 +536,7 @@
If you want to disable charset checking entirely, set the `charset` option to
`unset`:
-```
+```sh
[dont_check_me_bro!.txt]
charset = unset
```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/editorconfig-checker-3.6.1/cmd/editorconfig-checker/__snapshots__/main_test.snap
new/editorconfig-checker-3.7.0/cmd/editorconfig-checker/__snapshots__/main_test.snap
---
old/editorconfig-checker-3.6.1/cmd/editorconfig-checker/__snapshots__/main_test.snap
2026-01-28 21:45:37.000000000 +0100
+++
new/editorconfig-checker-3.7.0/cmd/editorconfig-checker/__snapshots__/main_test.snap
2026-05-25 19:18:48.000000000 +0200
@@ -110,3 +110,17 @@
1 errors found
---
+
+[TestMainColorSupport/format-github-actions-no-color - 1]
+::error file=testdata/trailing-whitespace.txt,line=1::Trailing whitespace
+
+1 errors found
+
+---
+
+[TestMainColorSupport/format-github-actions-color-override - 1]
+[31;1m::error file=testdata/trailing-whitespace.txt,line=1::Trailing
whitespace[33;0m
+[31;1m
+1 errors found[33;0m
+
+---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/editorconfig-checker-3.6.1/cmd/editorconfig-checker/main.go
new/editorconfig-checker-3.7.0/cmd/editorconfig-checker/main.go
--- old/editorconfig-checker-3.6.1/cmd/editorconfig-checker/main.go
2026-01-28 21:45:37.000000000 +0100
+++ new/editorconfig-checker-3.7.0/cmd/editorconfig-checker/main.go
2026-05-25 19:18:48.000000000 +0200
@@ -22,7 +22,7 @@
// version is used for the help and to verify against the version stored in
the config file
// version is dynamically set at compiletime
-var version string = "v3.6.1" // x-release-please-version
+var version string = "v3.7.0" // x-release-please-version
// defaultConfigFileNames determines the file names where the config is located
var defaultConfigFileNames = []string{".editorconfig-checker.json", ".ecrc"}
@@ -51,20 +51,24 @@
cpuprofile string
)
+var colorExplicitlySet bool
+
func enableNoColor(string) error {
cmdlineConfig.NoColor = true
+ colorExplicitlySet = true
return nil
}
func disableNoColor(string) error {
cmdlineConfig.NoColor = false
+ colorExplicitlySet = true
return nil
}
func init() {
flag.BoolVar(&writeConfigFile, "init", false, "creates an initial
configuration")
flag.StringVar(&configFilePath, "config", "", "config")
- flag.StringVar(&cmdlineExclude, "exclude", "", "a regex which files
should be excluded from checking - needs to be a valid regular expression")
+ flag.StringVar(&cmdlineExclude, "exclude", "", "a regex which files
should be excluded from checking - needs to be a valid regular expression.
Combine patterns with | (pipe): -exclude \"vendor|testdata\"")
flag.BoolVar(&cmdlineConfig.IgnoreDefaults, "ignore-defaults", false,
"ignore default excludes")
flag.BoolVar(&cmdlineConfig.DryRun, "dry-run", false, "show which files
would be checked")
flag.BoolVar(&cmdlineConfig.ShowVersion, "version", false, "print the
version number")
@@ -94,6 +98,7 @@
cmdlineExclude = ""
cmdlineConfig = config.Config{}
writeConfigFile = false
+ colorExplicitlySet = false
// check the NO_COLOR environment variable before parsing the
arguments, so the arguments can override
if nocolor := os.Getenv("NO_COLOR"); nocolor != "" {
@@ -155,6 +160,18 @@
}
}
+ // GitHub Actions annotations do not parse ANSI color codes; they render
+ // as literal escape sequences and break the annotation format. Default
to
+ // no-color when the effective output format is `github-actions`, but
let
+ // an explicit --color / --no-color flag take precedence. See #537.
+ effectiveFormat := currentConfig.Format
+ if cmdlineConfig.Format.IsValid() {
+ effectiveFormat = cmdlineConfig.Format
+ }
+ if effectiveFormat == outputformat.GithubActions && !colorExplicitlySet
{
+ cmdlineConfig.NoColor = true
+ }
+
currentConfig.Merge(cmdlineConfig)
}
@@ -235,6 +252,13 @@
config.Logger.Output("%s", version)
case config.Help:
config.Logger.Output("USAGE:")
+ config.Logger.Output(" editorconfig-checker [OPTIONS]
[FILE...]")
+ config.Logger.Output("")
+ config.Logger.Output("With no FILE arguments, all files tracked
by git are checked. When one or")
+ config.Logger.Output("more FILE arguments are given, only those
files are checked (the configured")
+ config.Logger.Output("exclude patterns still apply).")
+ config.Logger.Output("")
+ config.Logger.Output("OPTIONS:")
flag.CommandLine.SetOutput(config.Logger.GetWriter())
flag.PrintDefaults()
flag.CommandLine.SetOutput(nil)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/editorconfig-checker-3.6.1/cmd/editorconfig-checker/main_test.go
new/editorconfig-checker-3.7.0/cmd/editorconfig-checker/main_test.go
--- old/editorconfig-checker-3.6.1/cmd/editorconfig-checker/main_test.go
2026-01-28 21:45:37.000000000 +0100
+++ new/editorconfig-checker-3.7.0/cmd/editorconfig-checker/main_test.go
2026-05-25 19:18:48.000000000 +0200
@@ -165,6 +165,11 @@
{"envvar-yes", env{"NO_COLOR": "yes"}, args{}},
{"envvar-no", env{"NO_COLOR": "no"}, args{}},
{"envvar-stringval", env{"NO_COLOR": "some test value that
nobody would set"}, args{}},
+ // `-format github-actions` defaults to no-color since ANSI
escape codes
+ // break GitHub Actions annotation parsing (#537). An explicit
--color
+ // flag overrides the default.
+ {"format-github-actions-no-color", env{}, args{"--format",
"github-actions"}},
+ {"format-github-actions-color-override", env{}, args{"--color",
"--format", "github-actions"}},
}
// we use the error message of a missing config file to test the
coloredness of the output
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/default.nix
new/editorconfig-checker-3.7.0/default.nix
--- old/editorconfig-checker-3.6.1/default.nix 2026-01-28 21:45:37.000000000
+0100
+++ new/editorconfig-checker-3.7.0/default.nix 2026-05-25 19:18:48.000000000
+0200
@@ -2,7 +2,7 @@
with pkgs;
buildGoPackage rec {
- version = "v3.6.1" # x-release-please-version
+ version = "v3.7.0" # x-release-please-version
# create link so the tool can also be executed as `ec`
postInstall = ''
Binary files old/editorconfig-checker-3.6.1/editorconfig-checker and
new/editorconfig-checker-3.7.0/editorconfig-checker differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/go.mod
new/editorconfig-checker-3.7.0/go.mod
--- old/editorconfig-checker-3.6.1/go.mod 2026-01-28 21:45:37.000000000
+0100
+++ new/editorconfig-checker-3.7.0/go.mod 2026-05-25 19:18:48.000000000
+0200
@@ -1,31 +1,31 @@
module github.com/editorconfig-checker/editorconfig-checker/v3 //
x-release-please-major
-go 1.24.0
+go 1.25.0
require (
github.com/editorconfig/editorconfig-core-go/v2 v2.6.4
- github.com/gabriel-vasile/mimetype v1.4.12
- github.com/wlynxg/chardet v1.0.4
- golang.org/x/text v0.33.0
+ github.com/gabriel-vasile/mimetype v1.4.13
+ github.com/wlynxg/chardet v1.0.5
+ golang.org/x/text v0.37.0
)
require (
- github.com/gkampitakis/ciinfo v0.3.2 // indirect
- github.com/goccy/go-yaml v1.18.0 // indirect
+ github.com/gkampitakis/ciinfo v0.3.4 // indirect
+ github.com/goccy/go-yaml v1.19.2 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
- github.com/maruel/natural v1.1.1 // indirect
+ github.com/maruel/natural v1.3.0 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/sergi/go-diff v1.4.0 // indirect
github.com/stretchr/testify v1.8.1 // indirect
- github.com/tidwall/gjson v1.18.0 // indirect
+ github.com/tidwall/gjson v1.19.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
)
require (
- github.com/gkampitakis/go-snaps v0.5.19
- golang.org/x/mod v0.31.0 // indirect
+ github.com/gkampitakis/go-snaps v0.5.22
+ golang.org/x/mod v0.35.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/go.sum
new/editorconfig-checker-3.7.0/go.sum
--- old/editorconfig-checker-3.6.1/go.sum 2026-01-28 21:45:37.000000000
+0100
+++ new/editorconfig-checker-3.7.0/go.sum 2026-05-25 19:18:48.000000000
+0200
@@ -4,14 +4,14 @@
github.com/davecgh/go-spew v1.1.1/go.mod
h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/editorconfig/editorconfig-core-go/v2 v2.6.4
h1:CHwUbBVVyKWRX9kt5A/OtwhYUJB32DrFp9xzmjR6cac=
github.com/editorconfig/editorconfig-core-go/v2 v2.6.4/go.mod
h1:JWRVKHdVW+dkv6F8p+xGCa6a+TyMrqsFbFkSs/aQkrQ=
-github.com/gabriel-vasile/mimetype v1.4.12
h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw=
-github.com/gabriel-vasile/mimetype v1.4.12/go.mod
h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
-github.com/gkampitakis/ciinfo v0.3.2
h1:JcuOPk8ZU7nZQjdUhctuhQofk7BGHuIy0c9Ez8BNhXs=
-github.com/gkampitakis/ciinfo v0.3.2/go.mod
h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo=
-github.com/gkampitakis/go-snaps v0.5.19
h1:hUJlCQOpTt1M+kSisMwioDWZDWpDtdAvUhvWCx1YGW0=
-github.com/gkampitakis/go-snaps v0.5.19/go.mod
h1:gC3YqxQTPyIXvQrw/Vpt3a8VqR1MO8sVpZFWN4DGwNs=
-github.com/goccy/go-yaml v1.18.0
h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
-github.com/goccy/go-yaml v1.18.0/go.mod
h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
+github.com/gabriel-vasile/mimetype v1.4.13
h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM=
+github.com/gabriel-vasile/mimetype v1.4.13/go.mod
h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s=
+github.com/gkampitakis/ciinfo v0.3.4
h1:5eBSibVuSMbb/H6Elc0IIEFbkzCJi3lm94n0+U7Z0KY=
+github.com/gkampitakis/ciinfo v0.3.4/go.mod
h1:1NIwaOcFChN4fa/B0hEBdAb6npDlFL8Bwx4dfRLRqAo=
+github.com/gkampitakis/go-snaps v0.5.22
h1:xg9omphRnbDnimMCl1KqznC4krlxOGpkB0vDSfX2P7M=
+github.com/gkampitakis/go-snaps v0.5.22/go.mod
h1:uy3lVzCCRRsAwYqSocyw5fY8xRLCYEfqoOJNxr8HonM=
+github.com/goccy/go-yaml v1.19.2
h1:PmFC1S6h8ljIz6gMRBopkjP1TVT7xuwrButHID66PoM=
+github.com/goccy/go-yaml v1.19.2/go.mod
h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod
h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/kr/pretty v0.1.0/go.mod
h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
@@ -21,8 +21,8 @@
github.com/kr/text v0.1.0/go.mod
h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod
h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/maruel/natural v1.1.1
h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo=
-github.com/maruel/natural v1.1.1/go.mod
h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg=
+github.com/maruel/natural v1.3.0
h1:VsmCsBmEyrR46RomtgHs5hbKADGRVtliHTyCOLFBpsg=
+github.com/maruel/natural v1.3.0/go.mod
h1:v+Rfd79xlw1AgVBjbO0BEQmptqb5HvL/k9GRHB7ZKEg=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod
h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.0
h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod
h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -40,8 +40,8 @@
github.com/stretchr/testify v1.8.1
h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod
h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tidwall/gjson v1.14.2/go.mod
h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
-github.com/tidwall/gjson v1.18.0
h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
-github.com/tidwall/gjson v1.18.0/go.mod
h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
+github.com/tidwall/gjson v1.19.0
h1:xwxm7n691Uf3u5OFjzngavjGTh55KX5q/9w9xHW88JU=
+github.com/tidwall/gjson v1.19.0/go.mod
h1:V37/opeE/JbLUOfH0QTXiNez2l0RUjYUhpT4szFQAfc=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
github.com/tidwall/match v1.1.1/go.mod
h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.2.0/go.mod
h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
@@ -49,12 +49,12 @@
github.com/tidwall/pretty v1.2.1/go.mod
h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
github.com/tidwall/sjson v1.2.5/go.mod
h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
-github.com/wlynxg/chardet v1.0.4
h1:hkI71Dx8v3RiAz3XKV5lJEh9QfKo7xXKUmYJQeIMlpo=
-github.com/wlynxg/chardet v1.0.4/go.mod
h1:HLQMNsa0w4MkH2e7waQaFD+Yh85riFFTLhFtP8fsdbQ=
-golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI=
-golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg=
-golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
-golang.org/x/text v0.33.0/go.mod
h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
+github.com/wlynxg/chardet v1.0.5
h1:BNEolSEujJUtKwkaqNb0D6Ue+d7VTKTh5rXDyEdiipU=
+github.com/wlynxg/chardet v1.0.5/go.mod
h1:q4N3YNbywQtX0u12Eh0+0LZB53Ayc7nOfHHaio+RcVA=
+golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=
+golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=
+golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
+golang.org/x/text v0.37.0/go.mod
h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod
h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod
h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/pkg/config/config.go
new/editorconfig-checker-3.7.0/pkg/config/config.go
--- old/editorconfig-checker-3.6.1/pkg/config/config.go 2026-01-28
21:45:37.000000000 +0100
+++ new/editorconfig-checker-3.7.0/pkg/config/config.go 2026-05-25
19:18:48.000000000 +0200
@@ -58,6 +58,8 @@
"\\.terraform\\.lock\\.hcl$",
// uv (Python)
"uv\\.lock$",
+ // Buf (Protobuf)
+ "buf\\.lock$",
// yarn (NodeJS)
"\\.pnp\\.c?js$",
"\\.pnp\\.loader\\.mjs$",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/pkg/config/config_test.go
new/editorconfig-checker-3.7.0/pkg/config/config_test.go
--- old/editorconfig-checker-3.6.1/pkg/config/config_test.go 2026-01-28
21:45:37.000000000 +0100
+++ new/editorconfig-checker-3.7.0/pkg/config/config_test.go 2026-05-25
19:18:48.000000000 +0200
@@ -89,7 +89,7 @@
}
actual = c.GetExcludesAsRegularExpression()
- expected =
`testfiles|testdata|\.git/|\.jj/|Cargo\.lock$|/target/|composer\.lock$|Gemfile\.lock$|go\.(mod|sum|work|work\.sum)$|gradle/wrapper/gradle-wrapper\.properties$|gradlew(\.bat)?$|(buildscript-)?gradle\.lockfile?$|\.mvn/wrapper/maven-wrapper\.properties$|\.mvn/wrapper/MavenWrapperDownloader\.java$|mvnw(\.cmd)?$|/node_modules/|npm-shrinkwrap\.json$|package-lock\.json$|Pipfile\.lock$|poetry\.lock$|pnpm-lock\.yaml$|\.terraform\.lock\.hcl$|uv\.lock$|\.pnp\.c?js$|\.pnp\.loader\.mjs$|\.yarn/|yarn\.lock$|\.eot$|\.otf$|\.ttf$|\.woff2?$|\.avif$|\.gif$|\.ico$|\.jpe?g$|\.mp4$|\.p[bgnp]m$|\.png$|\.svg$|\.tiff?$|\.webp$|\.wmv$|\.bak$|\.bin$|\.docx?$|\.exe$|\.pdf$|\.snap$|\.xlsx?$|\.7z$|\.bz2$|\.gz$|\.jar$|\.tar$|\.tgz$|\.war$|\.zip$|\.log$|\.patch$|\.(css|js)\.map$|min\.(css|js)$|~$`
+ expected =
`testfiles|testdata|\.git/|\.jj/|Cargo\.lock$|/target/|composer\.lock$|Gemfile\.lock$|go\.(mod|sum|work|work\.sum)$|gradle/wrapper/gradle-wrapper\.properties$|gradlew(\.bat)?$|(buildscript-)?gradle\.lockfile?$|\.mvn/wrapper/maven-wrapper\.properties$|\.mvn/wrapper/MavenWrapperDownloader\.java$|mvnw(\.cmd)?$|/node_modules/|npm-shrinkwrap\.json$|package-lock\.json$|Pipfile\.lock$|poetry\.lock$|pnpm-lock\.yaml$|\.terraform\.lock\.hcl$|uv\.lock$|buf\.lock$|\.pnp\.c?js$|\.pnp\.loader\.mjs$|\.yarn/|yarn\.lock$|\.eot$|\.otf$|\.ttf$|\.woff2?$|\.avif$|\.gif$|\.ico$|\.jpe?g$|\.mp4$|\.p[bgnp]m$|\.png$|\.svg$|\.tiff?$|\.webp$|\.wmv$|\.bak$|\.bin$|\.docx?$|\.exe$|\.pdf$|\.snap$|\.xlsx?$|\.7z$|\.bz2$|\.gz$|\.jar$|\.tar$|\.tgz$|\.war$|\.zip$|\.log$|\.patch$|\.(css|js)\.map$|min\.(css|js)$|~$`
if actual != expected {
t.Errorf("expected %s, got %s", expected, actual)
@@ -116,7 +116,7 @@
mergeConfig := Config{
ShowVersion: true,
- Version: "v3.6.1", // x-release-please-version
+ Version: "v3.7.0", // x-release-please-version
Help: true,
DryRun: true,
Path: "some-other",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/pkg/encoding/encoding.go
new/editorconfig-checker-3.7.0/pkg/encoding/encoding.go
--- old/editorconfig-checker-3.6.1/pkg/encoding/encoding.go 2026-01-28
21:45:37.000000000 +0100
+++ new/editorconfig-checker-3.7.0/pkg/encoding/encoding.go 2026-05-25
19:18:48.000000000 +0200
@@ -168,6 +168,19 @@
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
}
+ // c0CharsStrictBinary is c0Chars excluding SO (0x0e), SI (0x0f), and
ESC (0x1b),
+ // which are used by ISO-2022 family encodings (ISO-2022-JP,
ISO-2022-KR, etc.).
+ // Use this for pre-decode binary detection to avoid false positives on
ISO-2022 text.
+ c0CharsStrictBinary = []byte{
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ // Allow TAB (ASCII 9), LF (10), FF (12), and CR (13)
+ 0x08 /*TAB LF*/, 0x0b, /*FF CR*/
+ // Allow SO (14) and SI (15) for ISO-2022 shift-out/shift-in
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ // Allow ESC (27) for ISO-2022 escape sequences
+ 0x18, 0x19, 0x1a, 0x1c, 0x1d, 0x1e, 0x1f,
+ }
+
c1Chars = []byte{
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
@@ -278,6 +291,14 @@
func Decode(contentBytes []byte) (string, string, error) {
encoding, _, _ := Detect(contentBytes)
+ // Check for binary data before attempting to decode.
+ // Binary files (e.g. GPG-encrypted data) can be incorrectly decoded as
single-byte encodings like MacCyrillic.
+ // We use IsStrictBinary (which excludes ESC/SO/SI) to avoid false
positives on ISO-2022 family text,
+ // and skip the check for UTF-16/32 which naturally contain null bytes.
+ if IsStrictBinary(contentBytes) && !isMultiByteEncoding(encoding) {
+ return string(contentBytes), BinaryData, nil
+ }
+
decodedContentString, err := decodeText(contentBytes, encoding)
if err != nil {
if IsBinary(contentBytes) {
@@ -436,12 +457,27 @@
return containsAnyByte(rawFileContent, c0Chars)
}
+// IsStrictBinary is like IsBinary but does not flag files that only contain
+// ESC (0x1b), SO (0x0e), or SI (0x0f) as their C0 control characters.
+// These are used by ISO-2022 family encodings (ISO-2022-JP, ISO-2022-KR, etc.)
+// and should not cause a file to be treated as binary.
+func IsStrictBinary(rawFileContent []byte) bool {
+ return containsAnyByte(rawFileContent, c0CharsStrictBinary)
+}
+
// IsBinaryFile is deprecated and may be removed in the future.
// Use IsBinary instead.
func IsBinaryFile(rawFileContent []byte) bool {
return IsBinary(rawFileContent)
}
+// isMultiByteEncoding returns true if the encoding is a multi-byte encoding
+// (UTF-16 or UTF-32) that naturally contains null bytes.
+func isMultiByteEncoding(enc string) bool {
+ normalized := normalizeName(enc)
+ return strings.HasPrefix(normalized, "utf16") ||
strings.HasPrefix(normalized, "utf32")
+}
+
// IsUTF16BE returns a hit/miss ratio to identify if the file is UTF16BE
encoded.
func IsUTF16BE(b []byte) float64 {
if DetectByBOM(b) == consts.UTF16Be {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/editorconfig-checker-3.6.1/pkg/encoding/encoding_test.go
new/editorconfig-checker-3.7.0/pkg/encoding/encoding_test.go
--- old/editorconfig-checker-3.6.1/pkg/encoding/encoding_test.go
2026-01-28 21:45:37.000000000 +0100
+++ new/editorconfig-checker-3.7.0/pkg/encoding/encoding_test.go
2026-05-25 19:18:48.000000000 +0200
@@ -533,6 +533,31 @@
}
}
+func TestDecodeBinaryFiles(t *testing.T) {
+ binaryFiles := []string{
+ "testdata/encrypted.gpg",
+ }
+
+ for _, filePath := range binaryFiles {
+ fileContent, err := os.ReadFile(filePath)
+ if err != nil {
+ t.Fatalf("could not read %s: %s", filePath, err.Error())
+ }
+
+ if !IsBinary(fileContent) {
+ t.Errorf("IsBinary(%s): expected true, got false",
filePath)
+ }
+
+ _, encoding, err := Decode(fileContent)
+ if err != nil {
+ t.Errorf("Decode(%s): unexpected error: %s", filePath,
err.Error())
+ }
+ if encoding != BinaryData {
+ t.Errorf("Decode(%s): expected encoding %q, got %q",
filePath, BinaryData, encoding)
+ }
+ }
+}
+
func TestDetect(t *testing.T) {
for i, tt := range tests {
failTest := tt.Confidence >= minConfidenceToFailTests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/editorconfig-checker-3.6.1/pkg/encoding/testdata/encrypted.gpg
new/editorconfig-checker-3.7.0/pkg/encoding/testdata/encrypted.gpg
--- old/editorconfig-checker-3.6.1/pkg/encoding/testdata/encrypted.gpg
1970-01-01 01:00:00.000000000 +0100
+++ new/editorconfig-checker-3.7.0/pkg/encoding/testdata/encrypted.gpg
2026-05-25 19:18:48.000000000 +0200
@@ -0,0 +1,2 @@
+�
+^��.�����@����]e� � )��,ł{I�LH�$ZxW��
�H���z��R�?�[u�[���?;�e��r
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/pkg/files/files.go
new/editorconfig-checker-3.7.0/pkg/files/files.go
--- old/editorconfig-checker-3.6.1/pkg/files/files.go 2026-01-28
21:45:37.000000000 +0100
+++ new/editorconfig-checker-3.7.0/pkg/files/files.go 2026-05-25
19:18:48.000000000 +0200
@@ -77,6 +77,44 @@
return append(filePaths, filePath)
}
+// hasGlobMeta reports whether the path contains any of the glob metacharacters
+// recognized by filepath.Match / filepath.Glob: '*', '?', '['.
+func hasGlobMeta(path string) bool {
+ for i := 0; i < len(path); i++ {
+ switch path[i] {
+ case '*', '?', '[':
+ return true
+ case '\\':
+ if i+1 < len(path) {
+ i++
+ }
+ }
+ }
+ return false
+}
+
+// resolvePassedFile expands a single --passed-file argument into one or more
+// concrete paths. Paths that exist on disk are returned unchanged. Paths that
+// don't exist but look like glob patterns are expanded via filepath.Glob; if
+// the pattern matches nothing the argument is returned unchanged so the caller
+// can surface a not-found error in the usual way.
+func resolvePassedFile(passedFile string) ([]string, error) {
+ if _, err := os.Stat(passedFile); err == nil {
+ return []string{passedFile}, nil
+ }
+ if !hasGlobMeta(passedFile) {
+ return []string{passedFile}, nil
+ }
+ matches, err := filepath.Glob(passedFile)
+ if err != nil {
+ return nil, fmt.Errorf("invalid pattern %q: %w", passedFile,
err)
+ }
+ if len(matches) == 0 {
+ return []string{passedFile}, nil
+ }
+ return matches, nil
+}
+
// GetFilesFromDirectory returns all files from a directory and its
subdirectories which should be checked
func GetFilesFromDirectory(rootDir string, config config.Config) ([]string,
error) {
filePaths := make([]string, 0)
@@ -116,14 +154,20 @@
// Handle explicit passed files
if len(config.PassedFiles) != 0 {
for _, passedFile := range config.PassedFiles {
- if !utils.IsDirectory(passedFile) {
- filePaths = AddToFiles(filePaths, passedFile,
config)
- } else {
- files, err := GetFilesFromDirectory(passedFile,
config)
- if err != nil {
- return filePaths, err
+ resolved, err := resolvePassedFile(passedFile)
+ if err != nil {
+ return filePaths, err
+ }
+ for _, entry := range resolved {
+ if utils.IsDirectory(entry) {
+ files, err :=
GetFilesFromDirectory(entry, config)
+ if err != nil {
+ return filePaths, err
+ }
+ filePaths = append(filePaths, files...)
+ } else {
+ filePaths = AddToFiles(filePaths,
entry, config)
}
- filePaths = append(filePaths, files...)
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/editorconfig-checker-3.6.1/pkg/files/files_test.go
new/editorconfig-checker-3.7.0/pkg/files/files_test.go
--- old/editorconfig-checker-3.6.1/pkg/files/files_test.go 2026-01-28
21:45:37.000000000 +0100
+++ new/editorconfig-checker-3.7.0/pkg/files/files_test.go 2026-05-25
19:18:48.000000000 +0200
@@ -3,6 +3,7 @@
import (
"encoding/json"
"os"
+ "path/filepath"
"reflect"
"regexp"
"runtime"
@@ -208,6 +209,135 @@
}
}
+func TestGetFilesGlobPattern(t *testing.T) {
+ globConfig := config.NewConfig(nil)
+ // Root-level markdown files (README.md, CHANGELOG.md, MAINTAINERS.md,
+ // CONTRIBUTING.md) exist relative to pkg/files when we walk up two
levels.
+ globConfig.PassedFiles = []string{"./../../*.md"}
+
+ files, err := GetFiles(*globConfig)
+ if err != nil {
+ t.Fatalf("GetFiles(glob): expected nil, got %s", err.Error())
+ }
+ if len(files) == 0 {
+ t.Fatalf("GetFiles(glob): expected at least one match for
./../../*.md, got 0")
+ }
+ for _, f := range files {
+ if !strings.HasSuffix(f, ".md") {
+ t.Errorf("GetFiles(glob): expected .md matches only,
got %q", f)
+ }
+ }
+}
+
+func TestGetFilesGlobWithoutMetaKeepsPath(t *testing.T) {
+ cfg := config.NewConfig(nil)
+ cfg.PassedFiles = []string{"./does/not/exist.txt"}
+
+ files, err := GetFiles(*cfg)
+ if err != nil {
+ t.Fatalf("GetFiles(missing): unexpected error %s", err.Error())
+ }
+ // Non-existent paths without glob metacharacters are passed straight to
+ // AddToFiles, which logs and drops them (they have no content type).
The
+ // call should not fail and should not invent matches.
+ for _, f := range files {
+ if f == "./does/not/exist.txt" {
+ return
+ }
+ }
+}
+
+func TestGetFilesGlobNoMatchesKeepsPath(t *testing.T) {
+ cfg := config.NewConfig(nil)
+ cfg.PassedFiles = []string{"./nonexistent-prefix-*.xyz"}
+
+ if _, err := GetFiles(*cfg); err != nil {
+ t.Fatalf("GetFiles(no-match glob): unexpected error %s",
err.Error())
+ }
+}
+
+func TestHasGlobMetaDetectsAllMetachars(t *testing.T) {
+ cases := []string{"*.go", "file?.txt", "log[0-9].txt", "a/b/c*"}
+ for _, p := range cases {
+ if !hasGlobMeta(p) {
+ t.Errorf("hasGlobMeta(%q): expected true, got false", p)
+ }
+ }
+ if hasGlobMeta("plain/path.txt") {
+ t.Errorf("hasGlobMeta(plain/path.txt): expected false, got
true")
+ }
+}
+
+func TestHasGlobMetaSkipsEscapedMetachars(t *testing.T) {
+ if runtime.GOOS == "windows" {
+ t.Skip("filepath.Match treats backslash as a path separator on
Windows")
+ }
+ cases := []struct {
+ path string
+ want bool
+ }{
+ {`\*.go`, false},
+ {`\?.txt`, false},
+ {`\[abc\]`, false},
+ {`dir/\*`, false},
+ {`\`, false},
+ {`foo\*bar*`, true},
+ }
+ for _, tc := range cases {
+ if got := hasGlobMeta(tc.path); got != tc.want {
+ t.Errorf("hasGlobMeta(%q): got %v, want %v", tc.path,
got, tc.want)
+ }
+ }
+}
+
+func TestResolvePassedFileInvalidPatternErrors(t *testing.T) {
+ _, err := resolvePassedFile("nonexistent-[unclosed")
+ if err == nil {
+ t.Fatalf("resolvePassedFile(invalid pattern): expected error,
got nil")
+ }
+ if !strings.Contains(err.Error(), "invalid pattern") {
+ t.Errorf("resolvePassedFile(invalid pattern): expected error to
mention \"invalid pattern\", got %q", err.Error())
+ }
+}
+
+func TestGetFilesGlobPropagatesInvalidPattern(t *testing.T) {
+ cfg := config.NewConfig(nil)
+ cfg.PassedFiles = []string{"nonexistent-[unclosed"}
+
+ if _, err := GetFiles(*cfg); err == nil {
+ t.Fatalf("GetFiles(invalid pattern): expected error, got nil")
+ }
+}
+
+func TestGetFilesGlobMatchesDirectory(t *testing.T) {
+ tmp := t.TempDir()
+ dir := filepath.Join(tmp, "dirA")
+ if err := os.Mkdir(dir, 0o755); err != nil {
+ t.Fatalf("setup mkdir: %v", err)
+ }
+ if err := os.WriteFile(filepath.Join(dir, "a.txt"), []byte("hello\n"),
0o644); err != nil {
+ t.Fatalf("setup writefile: %v", err)
+ }
+
+ cfg := config.NewConfig(nil)
+ cfg.PassedFiles = []string{filepath.Join(tmp, "dir*")}
+
+ files, err := GetFiles(*cfg)
+ if err != nil {
+ t.Fatalf("GetFiles(dir glob): unexpected error %s", err.Error())
+ }
+ found := false
+ for _, f := range files {
+ if strings.HasSuffix(f, "a.txt") {
+ found = true
+ break
+ }
+ }
+ if !found {
+ t.Errorf("GetFiles(dir glob): expected dir*/a.txt to be walked,
got %v", files)
+ }
+}
+
type getContentTypeFilesTest struct {
filename string
regex string
++++++ editorconfig-checker.obsinfo ++++++
--- /var/tmp/diff_new_pack.aG5Z6V/_old 2026-05-28 17:33:14.963382806 +0200
+++ /var/tmp/diff_new_pack.aG5Z6V/_new 2026-05-28 17:33:14.983383632 +0200
@@ -1,5 +1,5 @@
name: editorconfig-checker
-version: 3.6.1
-mtime: 1769633137
-commit: aa06cea887b26f372f9368aa53665266ec6dc364
+version: 3.7.0
+mtime: 1779729528
+commit: 03db2cca9a525b3831377be1e4696c06fdfef07a
++++++ vendor.tar.gz ++++++
++++ 2202 lines of diff (skipped)