From 47013f2f47f0fdfb03d1f4f4e8ec303a053b9bff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Luka=C5=A1=C3=ADk?= Date: Mon, 20 Nov 2023 10:04:20 +0100 Subject: [PATCH] ci lint: ignore teoretical xml tag name conflicts Addressing: Running [/home/runner/golangci-lint-1.55.2-linux-amd64/golangci-lint run --out-format=github-actions --out-${NO_FUTURE}format colored-line-number] in [] ... Error: pkg/xsd/attribute.go:18:28: SA5008: invalid XML tag: name "-" conflicts with name "attribute" in *github.com/gocomply/xsd2go/pkg/xsd.Attribute.XMLName (staticcheck) refAttr *Attribute `xml:"-"` ^ Error: pkg/xsd/attribute.go:20:28: SA5008: invalid XML tag: name "-" conflicts with name "schema" in *github.com/gocomply/xsd2go/pkg/xsd.Schema.XMLName (staticcheck) schema *Schema `xml:"-"` ^ Error: pkg/xsd/attributegroup.go:15:31: SA5008: invalid XML tag: name "-" conflicts with name "schema" in *github.com/gocomply/xsd2go/pkg/xsd.Schema.XMLName (staticcheck) schema *Schema `xml:"-"` ^ Error: pkg/xsd/choice.go:13:25: SA5008: invalid XML tag: name "-" conflicts with name "schema" in *github.com/gocomply/xsd2go/pkg/xsd.Schema.XMLName (staticcheck) schema *Schema `xml:"-"` ^ Error: pkg/xsd/element.go:22:31: SA5008: invalid XML tag: name "-" conflicts with name "element" in *github.com/gocomply/xsd2go/pkg/xsd.Element.XMLName (staticcheck) refElm *Element `xml:"-"` ^ --- .github/workflows/lint-golangci-lint.yaml | 5 +++++ .github/workflows/lint.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint-golangci-lint.yaml diff --git a/.github/workflows/lint-golangci-lint.yaml b/.github/workflows/lint-golangci-lint.yaml new file mode 100644 index 0000000..c852457 --- /dev/null +++ b/.github/workflows/lint-golangci-lint.yaml @@ -0,0 +1,5 @@ +linters-settings: + staticcheck: + checks: + - all + - '-SA5008' diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7941e55..c0f54ae 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -55,4 +55,4 @@ jobs: skip-go-installation: true skip-pkg-cache: true skip-build-cache: true - args: "--out-${NO_FUTURE}format colored-line-number" + args: "--out-${NO_FUTURE}format colored-line-number --config=./.github/workflows/lint-golangci-lint.yaml"