diff options
author | 6543 <6543@obermui.de> | 2020-11-29 21:54:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-29 15:54:08 -0500 |
commit | c4deb97ed105e923b922fae0ad8cc49327a13852 (patch) | |
tree | 18d31ca19b5ade0219a020405647f06cd5b445bc /vendor/github.com/editorconfig | |
parent | e8a6c425ecc649ba60885a49729d0fba9bba5e3e (diff) | |
download | gitea-c4deb97ed105e923b922fae0ad8cc49327a13852.tar.gz gitea-c4deb97ed105e923b922fae0ad8cc49327a13852.zip |
[Vendor] Update Batch 2020-11 (#13746)
* github.com/alecthomas/chroma v0.8.1 -> v0.8.2
Changelog: https://github.com/alecthomas/chroma/releases/tag/v0.8.2
* github.com/blevesearch/bleve v1.0.12 -> v1.0.13
Changelog: https://github.com/blevesearch/bleve/releases/tag/v1.0.13
* github.com/editorconfig/editorconfig-core-go v2.3.8 -> v2.3.9
Changelog: https://github.com/editorconfig/editorconfig-core-go/releases/tag/v2.3.9
* github.com/klauspost/compress v1.11.2 -> v1.11.3
Changelog: https://github.com/klauspost/compress/releases/tag/v1.11.3
* github.com/minio/minio-go v7.0.5 -> v7.0.6
Changelog: https://github.com/minio/minio-go/releases/tag/v7.0.6
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'vendor/github.com/editorconfig')
5 files changed, 25 insertions, 7 deletions
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/CHANGELOG.md b/vendor/github.com/editorconfig/editorconfig-core-go/v2/CHANGELOG.md index 4293e92201..39951b8ac8 100644 --- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/CHANGELOG.md +++ b/vendor/github.com/editorconfig/editorconfig-core-go/v2/CHANGELOG.md @@ -1,5 +1,12 @@ # Change log +## v2.3.9 - 2020-11-28 + +- Fix path separator on Windows + ([#83](https://github.com/editorconfig/editorconfig-core-go/pull/89)); +- Upgrade go-cmp v0.5.4 + ([#91](https://github.com/editorconfig/editorconfig-core-go/pull/91)). + ## v2.3.8 - 2020-10-17 - Feat more tests diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/editorconfig.go b/vendor/github.com/editorconfig/editorconfig-core-go/v2/editorconfig.go index 7021c0b8c3..2e0d88b570 100644 --- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/editorconfig.go +++ b/vendor/github.com/editorconfig/editorconfig-core-go/v2/editorconfig.go @@ -4,6 +4,7 @@ import ( "bytes" "io" "os" + "runtime" "strings" "gopkg.in/ini.v1" @@ -122,7 +123,11 @@ func (e *Editorconfig) GetDefinitionForFilename(name string) (*Definition, error } if !strings.HasPrefix(name, "/") { - name = "/" + name + if runtime.GOOS != "windows" { + name = "/" + name + } else { + name = "\\" + name + } } ok, err := e.FnmatchCase(selector, name) diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/fnmatch.go b/vendor/github.com/editorconfig/editorconfig-core-go/v2/fnmatch.go index e5eb09ef67..718846f254 100644 --- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/fnmatch.go +++ b/vendor/github.com/editorconfig/editorconfig-core-go/v2/fnmatch.go @@ -3,6 +3,7 @@ package editorconfig import ( "fmt" "regexp" + "runtime" "strconv" "strings" ) @@ -41,6 +42,11 @@ func translate(pattern string) string { // nolint: gocyclo matchesBraces := len(findLeftBrackets.FindAllString(pattern, -1)) == len(findRightBrackets.FindAllString(pattern, -1)) + pathSeparator := "/" + if runtime.GOOS == "windows" { + pathSeparator = regexp.QuoteMeta("\\") + } + for index < length { r := pat[index] index++ @@ -52,19 +58,19 @@ func translate(pattern string) string { // nolint: gocyclo result.WriteString(".*") index++ } else { - result.WriteString("[^/]*") + result.WriteString(fmt.Sprintf("[^%s]*", pathSeparator)) } case '/': p := index if p+2 < length && pat[p] == '*' && pat[p+1] == '*' && pat[p+2] == '/' { - result.WriteString("(?:/|/.*/)") + result.WriteString(fmt.Sprintf("(?:%s|%s.*%s)", pathSeparator, pathSeparator, pathSeparator)) index += 3 } else { result.WriteRune(r) } case '?': - result.WriteString("[^/]") + result.WriteString(fmt.Sprintf("[^%s]", pathSeparator)) case '[': if inBrackets { result.WriteString("\\[") diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.mod b/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.mod index 7e961937b5..3e9662318f 100644 --- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.mod +++ b/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.mod @@ -3,7 +3,7 @@ module github.com/editorconfig/editorconfig-core-go/v2 go 1.13 require ( - github.com/google/go-cmp v0.5.2 + github.com/google/go-cmp v0.5.4 github.com/smartystreets/goconvey v1.6.4 // indirect golang.org/x/mod v0.3.0 gopkg.in/ini.v1 v1.62.0 diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.sum b/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.sum index 89cfa9e249..6140fbc5e8 100644 --- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.sum +++ b/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.sum @@ -1,5 +1,5 @@ -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= |