summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/editorconfig
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2022-01-14 18:16:05 -0500
committerGitHub <noreply@github.com>2022-01-14 18:16:05 -0500
commit84145e45c50130922fae9055535ab5ea0378e1d4 (patch)
treefce077a5ae462840bb876ace79aca42abab29ed7 /vendor/github.com/editorconfig
parent2b16ca7c773de278ba01f122dc6f9f43d7534c52 (diff)
downloadgitea-84145e45c50130922fae9055535ab5ea0378e1d4.tar.gz
gitea-84145e45c50130922fae9055535ab5ea0378e1d4.zip
Remove golang vendored directory (#18277)
* rm go vendor * fix drone yaml * add to gitignore
Diffstat (limited to 'vendor/github.com/editorconfig')
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/.editorconfig23
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitattributes1
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitignore29
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitmodules3
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/.golangci.yml21
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/.goreleaser.yml74
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/CHANGELOG.md167
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/CMakeLists.txt5
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/Dockerfile5
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/LICENSE8
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/Makefile35
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/README.md131
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/cached_parser.go70
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/config.go91
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/definition.go194
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/editorconfig.go259
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/fnmatch.go207
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/go.doc2
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/go.mod10
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/go.sum29
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/parser.go13
-rw-r--r--vendor/github.com/editorconfig/editorconfig-core-go/v2/simple_parser.go33
22 files changed, 0 insertions, 1410 deletions
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.editorconfig b/vendor/github.com/editorconfig/editorconfig-core-go/v2/.editorconfig
deleted file mode 100644
index 4681936bde..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.editorconfig
+++ /dev/null
@@ -1,23 +0,0 @@
-; https://editorconfig.org/
-
-root = true
-
-[*]
-insert_final_newline = true
-charset = utf-8
-trim_trailing_whitespace = true
-indent_style = space
-indent_size = 2
-
-[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
-indent_style = tab
-indent_size = 4
-
-[*.md]
-indent_size = 4
-trim_trailing_whitespace = false
-
-eclint_indent_style = unset
-
-[Dockerfile]
-indent_size = 4
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitattributes b/vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitattributes
deleted file mode 100644
index 176a458f94..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-* text=auto
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitignore b/vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitignore
deleted file mode 100644
index f5dcd26083..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitignore
+++ /dev/null
@@ -1,29 +0,0 @@
-# ---> Go
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
-
-# EditorConfig
-
-/editorconfig
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitmodules b/vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitmodules
deleted file mode 100644
index 9e75e1ca0b..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "core-test"]
- path = core-test
- url = https://github.com/editorconfig/editorconfig-core-test.git
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.golangci.yml b/vendor/github.com/editorconfig/editorconfig-core-go/v2/.golangci.yml
deleted file mode 100644
index 3f0f8cff18..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.golangci.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-linters-settings:
- golint:
- min-confidence: 0.3
- cyclop:
- max-complexity: 15
- package-average: 10
-
-linters:
- disable:
- - exhaustivestruct
- - gomnd
- - interfacer
- - maligned
- presets:
- - bugs
- - complexity
- - format
- - performance
- - style
- - unused
- fast: false
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.goreleaser.yml b/vendor/github.com/editorconfig/editorconfig-core-go/v2/.goreleaser.yml
deleted file mode 100644
index 1a2981dcea..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/.goreleaser.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-project_name: editorconfig-core-go
-
-before:
- hooks:
- - go mod tidy
-
-builds:
-- id: editorconfig
- main: ./cmd/editorconfig/main.go
- binary: editorconfig
- env:
- - CGO_ENABLED=0
- goos:
- - linux
- - darwin
- - windows
-
-archives:
-- id: tarball
- builds:
- - editorconfig
- format_overrides:
- - goos: windows
- format: zip
- files:
- - none*
-
-dockers:
-- image_templates:
- - docker.pkg.github.com/editorconfig/editorconfig-core-go/editorconfig:latest
- - docker.pkg.github.com/editorconfig/editorconfig-core-go/editorconfig:{{ .Tag }}
- - docker.pkg.github.com/editorconfig/editorconfig-core-go/editorconfig:v{{ .Major }}
- - docker.pkg.github.com/editorconfig/editorconfig-core-go/editorconfig:v{{ .Major }}.{{ .Minor }}
- goos: linux
- goarch: amd64
- ids:
- - editorconfig
- build_flag_templates:
- - "--pull"
- - "--label=org.label-schema.schema-version=1.0"
- - "--label=org.label-schema.version={{ .Version }}"
- - "--label=org.label-schema.name={{ .ProjectName }}"
-
-nfpms:
-- vendor: EditorConfig
- homepage: https://github.com/editorconfig/editorconfig-core-go
- maintainer: Yoan Blanc <yoan@dosimple.ch>
- formats:
- - deb
- - rpm
- epoch: 1
- release: 1
-
-checksum:
- name_template: 'checksums.txt'
-
-signs:
-- artifacts: checksum
-
-snapshot:
- name_template: "{{ .Tag }}-development"
-
-changelog:
- sort: asc
- filters:
- exclude:
- - '^docs:'
- - '^test:'
-
-release:
- github:
- owner: editorconfig
- name: editorconfig-core-go
- draft: true
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/CHANGELOG.md b/vendor/github.com/editorconfig/editorconfig-core-go/v2/CHANGELOG.md
deleted file mode 100644
index 266d63d4d6..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/CHANGELOG.md
+++ /dev/null
@@ -1,167 +0,0 @@
-# Change log
-
-## v2.4.2 - 2021-03-21
-
-- Upgrade google/go-cmp v0.5.5
- ([#105](https://github.com/editorconfig/editorconfig-core-go/pull/105));
-- Upgrade x/mod v0.4.2
- ([#106](https://github.com/editorconfig/editorconfig-core-go/pull/106)).
-
-## v2.4.1 - 2021-02-25
-
-- Fix for Go 1.16 os.IsNotExist wrapping
- ([#102](https://github.com/editorconfig/editorconfig-core-go/pull/102)).
-
-## v2.4.0 - 2021-02-22
-
-- Fix new core-test
- ([#100](https://github.com/editorconfig/editorconfig-core-go/pull/100));
-- Upgrade github CI versions
- ([#99](https://github.com/editorconfig/editorconfig-core-go/pull/99));
-- Upgrade x/mod v0.4.1
- ([#98](https://github.com/editorconfig/editorconfig-core-go/pull/98));
-- Fix goreleaser deprecations
- ([#97](https://github.com/editorconfig/editorconfig-core-go/pull/97)).
-
-## v2.3.10 - 2021-02-05
-
-- Upgrade core-test
- ([#93](https://github.com/editorconfig/editorconfig-core-go/pull/93));
-- Upgrade x/mod v0.4.0
- ([#94](https://github.com/editorconfig/editorconfig-core-go/pull/94));
-- Upgrade golangci-lint to v1.34
- ([#95](https://github.com/editorconfig/editorconfig-core-go/pull/95)).
-
-## v2.3.9 - 2020-11-28
-
-- Fix path separator on Windows
- ([#69](https://github.com/editorconfig/editorconfig-core-go/pull/69));
-- 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
- ([#83](https://github.com/editorconfig/editorconfig-core-go/pull/83));
-- Upgrade go-ini v1.61.0
- ([#84](https://github.com/editorconfig/editorconfig-core-go/pull/84));
-- Upgrade go-ini v1.62.0
- ([#85](https://github.com/editorconfig/editorconfig-core-go/pull/85)).
-
-## v2.3.7 - 2020-09-05
-
-- Upgrade go-ini v1.60.2, and go-cmp v0.5.2
- ([#81](https://github.com/editorconfig/editorconfig-core-go/pull/81)).
-
-## v2.3.6 - 2020-08-25
-
-- Use goerr113 linter
- ([#77](https://github.com/editorconfig/editorconfig-core-go/pull/77));
-- Upgrade go-ini v1.60.0
- ([#78](https://github.com/editorconfig/editorconfig-core-go/pull/78));
-- Upgrade go-ini v1.60.1
- ([#79](https://github.com/editorconfig/editorconfig-core-go/pull/79)).
-
-## v2.3.5 - 2020-08-20
-
-- Upgrade go-cmp v0.5.1
- ([#73](https://github.com/editorconfig/editorconfig-core-go/pull/73));
-- Replace custom GitHub Action with official GolangCI Lint
- ([#74](https://github.com/editorconfig/editorconfig-core-go/pull/74));
-- Upgrade go-ini v1.58.0
- ([#75](https://github.com/editorconfig/editorconfig-core-go/pull/75)).
-
-## v2.3.4 - 2020-06-22
-
-- Wrap errors using Go 1.13 syntax
- ([#61](https://github.com/editorconfig/editorconfig-core-go/pull/61));
-- Upgrade base Docker image
- ([#68](https://github.com/editorconfig/editorconfig-core-go/pull/68));
-- Upgrade go-ini v1.57.0, go-cmp v0.5.0
- ([#70](https://github.com/editorconfig/editorconfig-core-go/pull/70)).
-
-## v2.3.3 - 2020-05-19
-
-- Using goreleaser
- ([#22](https://github.com/editorconfig/editorconfig-core-go/pull/22));
-- Upgrade go-cmp, go-ini, x/mod
- ([#60](https://github.com/editorconfig/editorconfig-core-go/pull/65));
-- Update CI actions
- ([#63](https://github.com/editorconfig/editorconfig-core-go/pull/63));
-
-## v2.3.2 - 2020-04-21
-
-- Upgrade go-ini v1.55.0
- ([#60](https://github.com/editorconfig/editorconfig-core-go/pull/60));
-- Build on latest Go
- ([#54](https://github.com/editorconfig/editorconfig-core-go/pull/54));
-- Use GitHub action instead of Travis CI
- ([#50](https://github.com/editorconfig/editorconfig-core-go/pull/50));
-
-## v2.3.1 - 2020-03-16
-
-- Use golang/x/mod/semver for semantic versioning checks
- ([#55](https://github.com/editorconfig/editorconfig-core-go/pull/55));
-- Enable wsl (WhiteSpace linter)
- ([#56](https://github.com/editorconfig/editorconfig-core-go/pull/56));
-- Replace testify dependency with Google's go-cmp
- ([#57](https://github.com/editorconfig/editorconfig-core-go/pull/57));
-- Upgrade go-ini to v1.54.0
- ([#58](https://github.com/editorconfig/editorconfig-core-go/pull/58)).
-
-## v2.3.0 - 2020-02-14
-
-- Implement a cached `Parser` to allow getting the definition of many files
- at once without re-reading the `.editorconfig` or parsing the _globbing_
- expression more than once.
- ([#51](https://github.com/editorconfig/editorconfig-core-go/pull/51));
-- Run golangci-lint on travis
- ([#26](https://github.com/editorconfig/editorconfig-core-go/pull/26)).
-
-## v2.2.2 - 2020-01-19
-
-- Bump core test to master
- ([#42](https://github.com/editorconfig/editorconfig-core-go/pull/42));
-- Bugfix error mangled when reading a file which could create a panic
- ([#47](https://github.com/editorconfig/editorconfig-core-go/pull/47));
-- Bugfix INI file generated would not show the correct value
- ([#46](https://github.com/editorconfig/editorconfig-core-go/pull/46)).
-
-## v2.2.1 - 2019-11-10
-
-- Implement pre 0.9.0 behavior
- ([#39](https://github.com/editorconfig/editorconfig-core-go/pull/39));
-- Fix values inheritance (regression)
- ([#43](https://github.com/editorconfig/editorconfig-core-go/pull/43)).
-
-## v2.2.0 - 2019-10-12
-
-- Allow parsing from an `io.Reader`, effectively deprecating `ParseBytes`
- by [@mvdan](https://github.com/mvdan)
- ([#32](https://github.com/editorconfig/editorconfig-core-go/pull/32));
-- Add support for the special `unset` value by [@greut](https://github.com/greut)
- ([#19](https://github.com/editorconfig/editorconfig-core-go/pull/19));
-- Skip values, properties or section that are considered too long
- ([#35](https://github.com/editorconfig/editorconfig-core-go/pull/35));
-- Clean up and documentation work by [@mstruebing](https://github.com/mstruebing/)
- ([#23](https://github.com/editorconfig/editorconfig-core-go/pull/23),
- [#24](https://github.com/editorconfig/editorconfig-core-go/pull/24)).
-
-## v2.1.1 - 2019-08-18
-
-- Fix a small path bug
- ([#17](https://github.com/editorconfig/editorconfig-core-go/issues/17),
- [#18](https://github.com/editorconfig/editorconfig-core-go/pull/18)).
-
-## v2.1.0 - 2019-08-10
-
-- This package is now *way* more compliant with the Editorconfig definition
- thanks to a refactor work made by [@greut](https://github.com/greut)
- ([#15](https://github.com/editorconfig/editorconfig-core-go/pull/15)).
-
-## v2.0.0 - 2019-07-14
-
-- This project now uses [Go Modules](https://blog.golang.org/using-go-modules)
- ([#14](https://github.com/editorconfig/editorconfig-core-go/pull/14));
-- The import path has been changed from `gopkg.in/editorconfig/editorconfig-core-go.v1`
- to `github.com/editorconfig/editorconfig-core-go/v2`.
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/CMakeLists.txt b/vendor/github.com/editorconfig/editorconfig-core-go/v2/CMakeLists.txt
deleted file mode 100644
index 89c9608493..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-project(editorconfig-core-go)
-cmake_minimum_required(VERSION 3.13)
-enable_testing()
-set(EDITORCONFIG_CMD ${CMAKE_CURRENT_LIST_DIR}/editorconfig)
-add_subdirectory(core-test)
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/Dockerfile b/vendor/github.com/editorconfig/editorconfig-core-go/v2/Dockerfile
deleted file mode 100644
index c913170ef2..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-FROM linuxkit/ca-certificates:v0.8
-
-COPY editorconfig /usr/local/bin/
-
-ENTRYPOINT [ "editorconfig" ]
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/LICENSE b/vendor/github.com/editorconfig/editorconfig-core-go/v2/LICENSE
deleted file mode 100644
index 4a30d56440..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/LICENSE
+++ /dev/null
@@ -1,8 +0,0 @@
-MIT License
-Copyright (c) 2016 The Editorconfig Team
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/Makefile b/vendor/github.com/editorconfig/editorconfig-core-go/v2/Makefile
deleted file mode 100644
index b3918a0921..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-PROJECT_ROOT_DIR := $(CURDIR)
-SRC := $(shell git ls-files *.go */*.go)
-
-.PHONY: bin test test-go test-core test-skipped submodule
-
-test: test-go test-core
-
-submodule:
- git submodule update --init
-
-editorconfig: $(SRC)
- go build \
- -ldflags "-X main.version=1.99.99" \
- github.com/editorconfig/editorconfig-core-go/v2/cmd/editorconfig
-
-test-go:
- go test -v ./...
-
-test-core: editorconfig
- cd core-test; \
- cmake ..
- cd core-test; \
- ctest \
- -E "^(octothorpe_in_value)$$" \
- --output-on-failure \
- .
-
-test-skipped: editorconfig
- cd core-test; \
- cmake ..
- cd core-test; \
- ctest \
- -R "^(octothorpe_in_value)$$" \
- --show-only \
- .
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/README.md b/vendor/github.com/editorconfig/editorconfig-core-go/v2/README.md
deleted file mode 100644
index 0a10fe5a21..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/README.md
+++ /dev/null
@@ -1,131 +0,0 @@
-![Build Status](https://github.com/editorconfig/editorconfig-core-go/workflows/.github/workflows/main.yml/badge.svg)
-[![GoDoc](https://godoc.org/github.com/editorconfig/editorconfig-core-go?status.svg)](https://godoc.org/github.com/editorconfig/editorconfig-core-go)
-[![Go Report Card](https://goreportcard.com/badge/github.com/editorconfig/editorconfig-core-go)](https://goreportcard.com/report/github.com/editorconfig/editorconfig-core-go)
-
-# Editorconfig Core Go
-
-A [Editorconfig][editorconfig] file parser and manipulator for Go.
-
-## Missing features
-
-- escaping comments in values, probably in [go-ini/ini](https://github.com/go-ini/ini)
-- [adjacent nested braces](https://github.com/editorconfig/editorconfig-core-test/pull/44)
-
-## Installing
-
-We recommend the use of Go 1.13+ modules for this package.
-
-Import by the same path. The package name you will use to access it is
-`editorconfig`.
-
-```go
-import "github.com/editorconfig/editorconfig-core-go/v2"
-```
-
-## Usage
-
-### Parse from file
-
-```go
-fp, err := os.Open("path/to/.editorconfig")
-if err != nil {
- log.Fatal(err)
-}
-defer fp.Close()
-
-editorConfig, err := editorconfig.Parse(fp)
-if err != nil {
- log.Fatal(err)
-}
-```
-
-### Parse from slice of bytes
-
-```go
-data := []byte("...")
-editorConfig, err := editorconfig.ParseBytes(data)
-if err != nil {
- log.Fatal(err)
-}
-```
-
-### Get definition to a given filename
-
-This method builds a definition to a given filename.
-This definition is a merge of the properties with selectors that matched the
-given filename.
-The lasts sections of the file have preference over the priors.
-
-```go
-def := editorConfig.GetDefinitionForFilename("my/file.go")
-```
-
-This definition have the following properties:
-
-```go
-type Definition struct {
- Selector string
-
- Charset string
- IndentStyle string
- IndentSize string
- TabWidth int
- EndOfLine string
- TrimTrailingWhitespace *bool
- InsertFinalNewline *bool
- Raw map[string]string
-}
-```
-
-#### Automatic search for `.editorconfig` files
-
-If you want a definition of a file without having to manually
-parse the `.editorconfig` files, you can then use the static version
-of `GetDefinitionForFilename`:
-
-```go
-def, err := editorconfig.GetDefinitionForFilename("foo/bar/baz/my-file.go")
-```
-
-In the example above, the package will automatically search for
-`.editorconfig` files on:
-
-- `foo/bar/baz/.editorconfig`
-- `foo/baz/.editorconfig`
-- `foo/.editorconfig`
-
-Until it reaches a file with `root = true` or the root of the filesystem.
-
-### Generating a .editorconfig file
-
-You can easily convert a Editorconfig struct to a compatible INI file:
-
-```go
-// serialize to slice of bytes
-data, err := editorConfig.Serialize()
-if err != nil {
- log.Fatal(err)
-}
-
-// save directly to file
-err := editorConfig.Save("path/to/.editorconfig")
-if err != nil {
- log.Fatal(err)
-}
-```
-
-## Contributing
-
-To run the tests:
-
-```bash
-go test -v ./...
-```
-
-To run the [integration tests](https://github.com/editorconfig/editorconfig-core-test):
-
-```
-make test-core
-```
-
-[editorconfig]: https://editorconfig.org/
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/cached_parser.go b/vendor/github.com/editorconfig/editorconfig-core-go/v2/cached_parser.go
deleted file mode 100644
index df107c5da9..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/cached_parser.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package editorconfig
-
-import (
- "fmt"
- "os"
- "regexp"
-
- "gopkg.in/ini.v1"
-)
-
-// CachedParser implements the Parser interface but caches the definition and
-// the regular expressions.
-type CachedParser struct {
- editorconfigs map[string]*Editorconfig
- regexps map[string]*regexp.Regexp
-}
-
-// NewCachedParser initializes the CachedParser.
-func NewCachedParser() *CachedParser {
- return &CachedParser{
- editorconfigs: make(map[string]*Editorconfig),
- regexps: make(map[string]*regexp.Regexp),
- }
-}
-
-// ParseIni parses the given filename to a Definition and caches the result.
-func (parser *CachedParser) ParseIni(filename string) (*Editorconfig, error) {
- ec, ok := parser.editorconfigs[filename]
- if !ok {
- fp, err := os.Open(filename)
- if err != nil {
- return nil, fmt.Errorf("error opening %q: %w", filename, err)
- }
-
- defer fp.Close()
-
- iniFile, err := ini.Load(fp)
- if err != nil {
- return nil, fmt.Errorf("error loading ini file %q: %w", filename, err)
- }
-
- ec, err = newEditorconfig(iniFile)
- if err != nil {
- return nil, fmt.Errorf("error creating config: %w", err)
- }
-
- parser.editorconfigs[filename] = ec
- }
-
- return ec, nil
-}
-
-// FnmatchCase calls the module's FnmatchCase and caches the parsed selector.
-func (parser *CachedParser) FnmatchCase(selector string, filename string) (bool, error) {
- r, ok := parser.regexps[selector]
- if !ok {
- p := translate(selector)
-
- var err error
-
- r, err = regexp.Compile(fmt.Sprintf("^%s$", p))
- if err != nil {
- return false, fmt.Errorf("error compiling selector %q: %w", selector, err)
- }
-
- parser.regexps[selector] = r
- }
-
- return r.MatchString(filename), nil
-}
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/config.go b/vendor/github.com/editorconfig/editorconfig-core-go/v2/config.go
deleted file mode 100644
index 0af310f0dd..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/config.go
+++ /dev/null
@@ -1,91 +0,0 @@
-package editorconfig
-
-import (
- "errors"
- "fmt"
- "os"
- "path/filepath"
- "strings"
-
- "golang.org/x/mod/semver"
-)
-
-// ErrInvalidVersion represents a standard error with the semantic version.
-var ErrInvalidVersion = errors.New("invalid semantic version")
-
-// Config holds the configuration.
-type Config struct {
- Path string
- Name string
- Version string
- Parser Parser
-}
-
-// Load loads definition of a given file.
-func (config *Config) Load(filename string) (*Definition, error) { // nolint: funlen
- // idiomatic go allows empty struct
- if config.Parser == nil {
- config.Parser = new(SimpleParser)
- }
-
- filename, err := filepath.Abs(filename)
- if err != nil {
- return nil, fmt.Errorf("cannot get absolute path for %q: %w", filename, err)
- }
-
- ecFile := config.Name
- if ecFile == "" {
- ecFile = ConfigNameDefault
- }
-
- definition := &Definition{}
- definition.Raw = make(map[string]string)
-
- if config.Version != "" {
- version := config.Version
- if !strings.HasPrefix(version, "v") {
- version = "v" + version
- }
-
- if ok := semver.IsValid(version); !ok {
- return nil, fmt.Errorf("version %s error: %w", config.Version, ErrInvalidVersion)
- }
-
- definition.version = version
- }
-
- dir := filename
- for dir != filepath.Dir(dir) {
- dir = filepath.Dir(dir)
-
- ec, err := config.Parser.ParseIni(filepath.Join(dir, ecFile))
- if err != nil {
- if errors.Is(err, os.ErrNotExist) {
- continue
- }
-
- return nil, fmt.Errorf("cannot parse the ini file %q: %w", ecFile, err)
- }
-
- // give it the current config.
- ec.config = config
-
- relativeFilename := filename
- if len(dir) < len(relativeFilename) {
- relativeFilename = relativeFilename[len(dir):]
- }
-
- def, err := ec.GetDefinitionForFilename(relativeFilename)
- if err != nil {
- return nil, fmt.Errorf("cannot get definition for %q: %w", relativeFilename, err)
- }
-
- definition.merge(def)
-
- if ec.Root {
- break
- }
- }
-
- return definition, nil
-}
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/definition.go b/vendor/github.com/editorconfig/editorconfig-core-go/v2/definition.go
deleted file mode 100644
index 5a553ff2e9..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/definition.go
+++ /dev/null
@@ -1,194 +0,0 @@
-package editorconfig
-
-import (
- "fmt"
- "strconv"
- "strings"
-
- "golang.org/x/mod/semver"
- "gopkg.in/ini.v1"
-)
-
-// Definition represents a definition inside the .editorconfig file.
-// E.g. a section of the file.
-// The definition is composed of the selector ("*", "*.go", "*.{js.css}", etc),
-// plus the properties of the selected files.
-type Definition struct {
- Selector string `ini:"-" json:"-"`
-
- Charset string `ini:"charset" json:"charset,omitempty"`
- IndentStyle string `ini:"indent_style" json:"indent_style,omitempty"`
- IndentSize string `ini:"indent_size" json:"indent_size,omitempty"`
- TabWidth int `ini:"-" json:"-"`
- EndOfLine string `ini:"end_of_line" json:"end_of_line,omitempty"`
- TrimTrailingWhitespace *bool `ini:"-" json:"-"`
- InsertFinalNewline *bool `ini:"-" json:"-"`
- Raw map[string]string `ini:"-" json:"-"`
- version string
-}
-
-// NewDefinition builds a definition from a given config.
-func NewDefinition(config Config) (*Definition, error) {
- return config.Load(config.Path)
-}
-
-// normalize fixes some values to their lowercase value.
-func (d *Definition) normalize() error {
- d.Charset = strings.ToLower(d.Charset)
- d.EndOfLine = strings.ToLower(d.Raw["end_of_line"])
- d.IndentStyle = strings.ToLower(d.Raw["indent_style"])
-
- trimTrailingWhitespace, ok := d.Raw["trim_trailing_whitespace"]
- if ok && trimTrailingWhitespace != UnsetValue {
- trim, err := strconv.ParseBool(trimTrailingWhitespace)
- if err != nil {
- return fmt.Errorf("trim_trailing_whitespace=%s is not an acceptable value. %w", trimTrailingWhitespace, err)
- }
-
- d.TrimTrailingWhitespace = &trim
- }
-
- insertFinalNewline, ok := d.Raw["insert_final_newline"]
- if ok && insertFinalNewline != UnsetValue {
- insert, err := strconv.ParseBool(insertFinalNewline)
- if err != nil {
- return fmt.Errorf("insert_final_newline=%s is not an acceptable value. %w", insertFinalNewline, err)
- }
-
- d.InsertFinalNewline = &insert
- }
-
- // tab_width from Raw
- tabWidth, ok := d.Raw["tab_width"]
- if ok && tabWidth != UnsetValue {
- num, err := strconv.Atoi(tabWidth)
- if err != nil {
- return fmt.Errorf("tab_width=%s is not an acceptable value. %w", tabWidth, err)
- }
-
- d.TabWidth = num
- }
-
- // tab_width defaults to indent_size:
- // https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#tab_width
- num, err := strconv.Atoi(d.IndentSize)
- if err == nil && d.TabWidth <= 0 {
- d.TabWidth = num
- }
-
- return nil
-}
-
-// merge the parent definition into the child definition.
-func (d *Definition) merge(md *Definition) {
- if len(d.Charset) == 0 {
- d.Charset = md.Charset
- }
-
- if len(d.IndentStyle) == 0 {
- d.IndentStyle = md.IndentStyle
- }
-
- if len(d.IndentSize) == 0 {
- d.IndentSize = md.IndentSize
- }
-
- if d.TabWidth <= 0 {
- d.TabWidth = md.TabWidth
- }
-
- if len(d.EndOfLine) == 0 {
- d.EndOfLine = md.EndOfLine
- }
-
- if trimTrailingWhitespace, ok := d.Raw["trim_trailing_whitespace"]; !ok || trimTrailingWhitespace != UnsetValue {
- if d.TrimTrailingWhitespace == nil {
- d.TrimTrailingWhitespace = md.TrimTrailingWhitespace
- }
- }
-
- if insertFinalNewline, ok := d.Raw["insert_final_newline"]; !ok || insertFinalNewline != UnsetValue {
- if d.InsertFinalNewline == nil {
- d.InsertFinalNewline = md.InsertFinalNewline
- }
- }
-
- for k, v := range md.Raw {
- if _, ok := d.Raw[k]; !ok {
- d.Raw[k] = v
- }
- }
-}
-
-// InsertToIniFile writes the definition into a ini file.
-func (d *Definition) InsertToIniFile(iniFile *ini.File) { // nolint: funlen,gocognit,cyclop
- iniSec := iniFile.Section(d.Selector)
-
- for k, v := range d.Raw {
- switch k {
- case "insert_final_newline":
- if d.InsertFinalNewline != nil {
- v = strconv.FormatBool(*d.InsertFinalNewline)
- } else {
- insertFinalNewline, ok := d.Raw["insert_final_newline"]
- if !ok {
- break
- }
-
- v = strings.ToLower(insertFinalNewline)
- }
- case "trim_trailing_whitespace":
- if d.TrimTrailingWhitespace != nil {
- v = strconv.FormatBool(*d.TrimTrailingWhitespace)
- } else {
- trimTrailingWhitespace, ok := d.Raw["trim_trailing_whitespace"]
- if !ok {
- break
- }
-
- v = strings.ToLower(trimTrailingWhitespace)
- }
- case "charset":
- v = d.Charset
- case "end_of_line":
- v = d.EndOfLine
- case "indent_style":
- v = d.IndentStyle
- case "tab_width":
- tabWidth, ok := d.Raw["tab_width"]
- if ok && tabWidth == UnsetValue {
- v = tabWidth
- } else {
- v = strconv.Itoa(d.TabWidth)
- }
- case "indent_size":
- v = d.IndentSize
- }
-
- iniSec.NewKey(k, v) // nolint: errcheck
- }
-
- if _, ok := d.Raw["indent_size"]; !ok {
- tabWidth, ok := d.Raw["tab_width"]
-
- switch {
- case ok && tabWidth == UnsetValue:
- // do nothing
- case d.TabWidth > 0:
- iniSec.NewKey("indent_size", strconv.Itoa(d.TabWidth)) // nolint: errcheck
- case d.IndentStyle == IndentStyleTab && (d.version == "" || semver.Compare(d.version, "v0.9.0") >= 0):
- iniSec.NewKey("indent_size", IndentStyleTab) // nolint: errcheck
- }
- }
-
- if _, ok := d.Raw["tab_width"]; !ok {
- if d.IndentSize == UnsetValue {
- iniSec.NewKey("tab_width", d.IndentSize) // nolint: errcheck
- } else {
- _, err := strconv.Atoi(d.IndentSize)
- if err == nil {
- iniSec.NewKey("tab_width", d.Raw["indent_size"]) // nolint: errcheck
- }
- }
- }
-}
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/editorconfig.go b/vendor/github.com/editorconfig/editorconfig-core-go/v2/editorconfig.go
deleted file mode 100644
index 76d3f1af8f..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/editorconfig.go
+++ /dev/null
@@ -1,259 +0,0 @@
-package editorconfig
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "runtime"
- "strings"
-
- "gopkg.in/ini.v1"
-)
-
-const (
- // ConfigNameDefault represents the name of the configuration file.
- ConfigNameDefault = ".editorconfig"
- // UnsetValue is the value that unsets a preexisting variable.
- UnsetValue = "unset"
-)
-
-// IndentStyle possible values.
-const (
- IndentStyleTab = "tab"
- IndentStyleSpaces = "space"
-)
-
-// EndOfLine possible values.
-const (
- EndOfLineLf = "lf"
- EndOfLineCr = "cr"
- EndOfLineCrLf = "crlf"
-)
-
-// Charset possible values.
-const (
- CharsetLatin1 = "latin1"
- CharsetUTF8 = "utf-8"
- CharsetUTF16BE = "utf-16be"
- CharsetUTF16LE = "utf-16le"
- CharsetUTF8BOM = "utf-8 bom"
-)
-
-// Limit for section name.
-const (
- MaxSectionLength = 4096
-)
-
-// Editorconfig represents a .editorconfig file.
-//
-// It is composed by a "root" property, plus the definitions defined in the
-// file.
-type Editorconfig struct {
- Root bool
- Definitions []*Definition
- config *Config
-}
-
-// newEditorconfig builds the configuration from an INI file.
-func newEditorconfig(iniFile *ini.File) (*Editorconfig, error) {
- editorConfig := &Editorconfig{}
-
- // Consider mixed-case values for true and false.
- rootKey := iniFile.Section(ini.DefaultSection).Key("root")
- rootKey.SetValue(strings.ToLower(rootKey.Value()))
- editorConfig.Root = rootKey.MustBool(false)
-
- for _, sectionStr := range iniFile.SectionStrings() {
- if sectionStr == ini.DefaultSection || len(sectionStr) > MaxSectionLength {
- continue
- }
-
- iniSection := iniFile.Section(sectionStr)
- definition := &Definition{}
- raw := make(map[string]string)
-
- if err := iniSection.MapTo(&definition); err != nil {
- return nil, fmt.Errorf("error mapping current section: %w", err)
- }
-
- // Shallow copy all the properties
- for k, v := range iniSection.KeysHash() {
- raw[strings.ToLower(k)] = v
- }
-
- definition.Raw = raw
- definition.Selector = sectionStr
-
- if err := definition.normalize(); err != nil {
- return nil, fmt.Errorf("normalization error: %w", err)
- }
-
- editorConfig.Definitions = append(editorConfig.Definitions, definition)
- }
-
- return editorConfig, nil
-}
-
-// GetDefinitionForFilename returns a definition for the given filename.
-//
-// The result is a merge of the selectors that matched the file.
-// The last section has preference over the priors.
-func (e *Editorconfig) GetDefinitionForFilename(name string) (*Definition, error) {
- def := &Definition{
- Raw: make(map[string]string),
- }
-
- // The last section has preference over the priors.
- for i := len(e.Definitions) - 1; i >= 0; i-- {
- actualDef := e.Definitions[i]
- selector := actualDef.Selector
-
- if !strings.HasPrefix(selector, "/") {
- if strings.ContainsRune(selector, '/') {
- selector = "/" + selector
- } else {
- selector = "/**/" + selector
- }
- }
-
- if !strings.HasPrefix(name, "/") {
- if runtime.GOOS != "windows" {
- name = "/" + name
- } else {
- name = "\\" + name
- }
- }
-
- ok, err := e.FnmatchCase(selector, name)
- if err != nil {
- return nil, err
- }
-
- if ok {
- def.merge(actualDef)
- }
- }
-
- return def, nil
-}
-
-// FnmatchCase calls the matcher from the config's parser or the vanilla's.
-func (e *Editorconfig) FnmatchCase(selector string, filename string) (bool, error) {
- if e.config != nil && e.config.Parser != nil {
- return e.config.Parser.FnmatchCase(selector, filename)
- }
-
- return FnmatchCase(selector, filename)
-}
-
-// Serialize converts the Editorconfig to a slice of bytes, containing the
-// content of the file in the INI format.
-func (e *Editorconfig) Serialize() ([]byte, error) {
- buffer := bytes.NewBuffer(nil)
-
- err := e.Write(buffer)
- if err != nil {
- return nil, fmt.Errorf("cannot write into buffer: %w", err)
- }
-
- return buffer.Bytes(), nil
-}
-
-// Write writes the Editorconfig to the Writer in a compatible INI file.
-func (e *Editorconfig) Write(w io.Writer) error {
- iniFile := ini.Empty()
-
- iniFile.Section(ini.DefaultSection).Comment = "https://editorconfig.org"
-
- if e.Root {
- iniFile.Section(ini.DefaultSection).Key("root").SetValue(boolToString(e.Root))
- }
-
- for _, d := range e.Definitions {
- d.InsertToIniFile(iniFile)
- }
-
- _, err := iniFile.WriteTo(w)
- if err != nil {
- return fmt.Errorf("error writing ini file: %w", err)
- }
-
- return nil
-}
-
-// Save saves the Editorconfig to a compatible INI file.
-func (e *Editorconfig) Save(filename string) error {
- f, err := os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0o644)
- if err != nil {
- return fmt.Errorf("cannot open file %q: %w", filename, err)
- }
-
- return e.Write(f)
-}
-
-func boolToString(b bool) string {
- if b {
- return "true"
- }
-
- return "false"
-}
-
-// Parse parses from a reader.
-func Parse(r io.Reader) (*Editorconfig, error) {
- iniFile, err := ini.Load(r)
- if err != nil {
- return nil, fmt.Errorf("cannot load ini file: %w", err)
- }
-
- return newEditorconfig(iniFile)
-}
-
-// ParseBytes parses from a slice of bytes.
-//
-// Deprecated: use Parse instead.
-func ParseBytes(data []byte) (*Editorconfig, error) {
- iniFile, err := ini.Load(data)
- if err != nil {
- return nil, fmt.Errorf("cannot load ini file: %w", err)
- }
-
- return newEditorconfig(iniFile)
-}
-
-// ParseFile parses from a file.
-//
-// Deprecated: use Parse instead.
-func ParseFile(path string) (*Editorconfig, error) {
- iniFile, err := ini.Load(path)
- if err != nil {
- return nil, fmt.Errorf("cannot load ini file: %w", err)
- }
-
- return newEditorconfig(iniFile)
-}
-
-// GetDefinitionForFilename given a filename, searches
-// for .editorconfig files, starting from the file folder,
-// walking through the previous folders, until it reaches a
-// folder with `root = true`, and returns the right editorconfig
-// definition for the given file.
-func GetDefinitionForFilename(filename string) (*Definition, error) {
- config := new(Config)
-
- return config.Load(filename)
-}
-
-// GetDefinitionForFilenameWithConfigname given a filename and a configname,
-// searches for configname files, starting from the file folder,
-// walking through the previous folders, until it reaches a
-// folder with `root = true`, and returns the right editorconfig
-// definition for the given file.
-func GetDefinitionForFilenameWithConfigname(filename string, configname string) (*Definition, error) {
- config := &Config{
- Name: configname,
- }
-
- return config.Load(filename)
-}
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/fnmatch.go b/vendor/github.com/editorconfig/editorconfig-core-go/v2/fnmatch.go
deleted file mode 100644
index 16970176ed..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/fnmatch.go
+++ /dev/null
@@ -1,207 +0,0 @@
-package editorconfig
-
-import (
- "fmt"
- "regexp"
- "runtime"
- "strconv"
- "strings"
-)
-
-var (
- // findLeftBrackets matches the opening left bracket {.
- findLeftBrackets = regexp.MustCompile(`(^|[^\\])\{`)
- // findDoubleLeftBrackets matches the duplicated opening left bracket {{.
- findDoubleLeftBrackets = regexp.MustCompile(`(^|[^\\])\{\{`)
- // findLeftBrackets matches the closing right bracket {.
- findRightBrackets = regexp.MustCompile(`(^|[^\\])\}`)
- // findDoubleRightBrackets matches the duplicated opening left bracket {{.
- findDoubleRightBrackets = regexp.MustCompile(`(^|[^\\])\}\}`)
- // findNumericRange matches a range of number, e.g. -2..5.
- findNumericRange = regexp.MustCompile(`^([+-]?\d+)\.\.([+-]?\d+)$`)
-)
-
-// FnmatchCase tests whether the name matches the given pattern case included.
-func FnmatchCase(pattern, name string) (bool, error) {
- p := translate(pattern)
-
- r, err := regexp.Compile(fmt.Sprintf("^%s$", p))
- if err != nil {
- return false, fmt.Errorf("error compiling %q: %w", pattern, err)
- }
-
- return r.MatchString(name), nil
-}
-
-func translate(pattern string) string { // nolint: funlen,gocognit,gocyclo,cyclop
- index := 0
- pat := []rune(pattern)
- length := len(pat)
-
- result := strings.Builder{}
-
- braceLevel := 0
- isEscaped := false
- inBrackets := false
-
- // Double left and right is a hack to pass the core-test suite.
- left := len(findLeftBrackets.FindAllString(pattern, -1))
- doubleLeft := len(findDoubleLeftBrackets.FindAllString(pattern, -1))
- right := len(findRightBrackets.FindAllString(pattern, -1))
- doubleRight := len(findDoubleRightBrackets.FindAllString(pattern, -1))
- matchesBraces := left+doubleLeft == right+doubleRight
- pathSeparator := "/"
-
- if runtime.GOOS == "windows" {
- pathSeparator = regexp.QuoteMeta("\\")
- }
-
- for index < length {
- r := pat[index]
- index++
-
- switch r {
- case '*':
- p := index
- if p < length && pat[p] == '*' {
- result.WriteString(".*")
- index++
- } else {
- result.WriteString(fmt.Sprintf("[^%s]*", pathSeparator))
- }
- case '/':
- p := index
- if p+2 < length && pat[p] == '*' && pat[p+1] == '*' && pat[p+2] == '/' {
- result.WriteString(fmt.Sprintf("(?:%s|%s.*%s)", pathSeparator, pathSeparator, pathSeparator))
-
- index += 3
- } else {
- result.WriteRune(r)
- }
- case '?':
- result.WriteString(fmt.Sprintf("[^%s]", pathSeparator))
- case '[':
- if inBrackets { // nolint: nestif
- result.WriteString("\\[")
- } else {
- hasSlash := false
- res := strings.Builder{}
-
- p := index
- for p < length {
- if pat[p] == ']' && pat[p-1] != '\\' {
- break
- }
- res.WriteRune(pat[p])
- if pat[p] == '/' && pat[p-1] != '\\' {
- hasSlash = true
-
- break
- }
- p++
- }
- if hasSlash {
- result.WriteString("\\[" + res.String())
- index = p + 1
- } else {
- inBrackets = true
- if index < length && pat[index] == '!' || pat[index] == '^' {
- index++
- result.WriteString("[^")
- } else {
- result.WriteRune('[')
- }
- }
- }
- case ']':
- if inBrackets && pat[index-2] == '\\' {
- result.WriteString("\\]")
- } else {
- result.WriteRune(r)
- inBrackets = false
- }
- case '{':
- hasComma := false
- p := index
- res := strings.Builder{}
-
- for p < length {
- if pat[p] == '}' && pat[p-1] != '\\' {
- break
- }
-
- res.WriteRune(pat[p])
-
- if pat[p] == ',' && pat[p-1] != '\\' {
- hasComma = true
-
- break
- }
- p++
- }
-
- switch {
- case !hasComma && p < length:
- inner := res.String()
-
- sub := findNumericRange.FindStringSubmatch(inner)
- if len(sub) == 3 {
- from, _ := strconv.Atoi(sub[1])
- to, _ := strconv.Atoi(sub[2])
-
- result.WriteString("(?:")
-
- // XXX does not scale well
- for i := from; i < to; i++ {
- result.WriteString(strconv.Itoa(i))
- result.WriteRune('|')
- }
-
- result.WriteString(strconv.Itoa(to))
- result.WriteRune(')')
- } else {
- r := translate(inner)
-
- result.WriteString(fmt.Sprintf("\\{%s\\}", r))
- }
-
- index = p + 1
- case matchesBraces:
- result.WriteString("(?:")
- braceLevel++
- default:
- result.WriteString("\\{")
- }
- case '}':
- if braceLevel > 0 {
- if isEscaped {
- result.WriteRune('}')
-
- isEscaped = false
- } else {
- result.WriteRune(')')
-
- braceLevel--
- }
- } else {
- result.WriteString("\\}")
- }
- case ',':
- if braceLevel == 0 || isEscaped {
- result.WriteRune(r)
- } else {
- result.WriteRune('|')
- }
- default:
- if r != '\\' || isEscaped {
- result.WriteString(regexp.QuoteMeta(string(r)))
-
- isEscaped = false
- } else {
- isEscaped = true
- }
- }
- }
-
- return result.String()
-}
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.doc b/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.doc
deleted file mode 100644
index 7c62ef2052..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.doc
+++ /dev/null
@@ -1,2 +0,0 @@
-// Package editorconfig can be used to parse and generate editorconfig files.
-// For more information about editorconfig, see https://editorconfig.org/
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.mod b/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.mod
deleted file mode 100644
index 6c30132465..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.mod
+++ /dev/null
@@ -1,10 +0,0 @@
-module github.com/editorconfig/editorconfig-core-go/v2
-
-go 1.13
-
-require (
- github.com/google/go-cmp v0.5.5
- github.com/smartystreets/goconvey v1.6.4 // indirect
- golang.org/x/mod v0.4.2
- 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
deleted file mode 100644
index 39d857b8a8..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/go.sum
+++ /dev/null
@@ -1,29 +0,0 @@
-github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
-github.com/google/go-cmp v0.5.5/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=
-github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
-github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
-golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
-gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/parser.go b/vendor/github.com/editorconfig/editorconfig-core-go/v2/parser.go
deleted file mode 100644
index 33c07a0356..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/parser.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package editorconfig
-
-// Parser interface is responsible for the parsing of the ini file and the
-// globbing patterns.
-type Parser interface {
- // ParseIni takes one .editorconfig (ini format) filename and returns its
- // Editorconfig definition.
- ParseIni(filename string) (*Editorconfig, error)
-
- // FnmatchCase takes a pattern, a filename, and tells wether the given filename
- // matches the globbing pattern.
- FnmatchCase(pattern string, filename string) (bool, error)
-}
diff --git a/vendor/github.com/editorconfig/editorconfig-core-go/v2/simple_parser.go b/vendor/github.com/editorconfig/editorconfig-core-go/v2/simple_parser.go
deleted file mode 100644
index fe1301e2b3..0000000000
--- a/vendor/github.com/editorconfig/editorconfig-core-go/v2/simple_parser.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package editorconfig
-
-import (
- "fmt"
- "os"
-
- "gopkg.in/ini.v1"
-)
-
-// SimpleParser implements the Parser interface but without doing any caching.
-type SimpleParser struct{}
-
-// ParseIni calls go-ini's Load on the file.
-func (parser *SimpleParser) ParseIni(filename string) (*Editorconfig, error) {
- fp, err := os.Open(filename)
- if err != nil {
- return nil, err // nolint: wrapcheck
- }
-
- defer fp.Close()
-
- iniFile, err := ini.Load(fp)
- if err != nil {
- return nil, fmt.Errorf("cannot load %q: %w", filename, err)
- }
-
- return newEditorconfig(iniFile)
-}
-
-// FnmatchCase calls the module's FnmatchCase.
-func (parser *SimpleParser) FnmatchCase(selector string, filename string) (bool, error) {
- return FnmatchCase(selector, filename)
-}