From cd034c0540c8c5faed99e28e33da1ed97e223dc7 Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Thu, 3 Feb 2022 15:52:45 -0800 Subject: [PATCH 1/2] Disable linter for now Blows up on generic type parameters so disabling until it's working. Restored installation to its original form. --- eng/.golangci.yml | 2 +- eng/pipelines/templates/steps/analyze.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/.golangci.yml b/eng/.golangci.yml index b18faecec705..e4e98907a911 100644 --- a/eng/.golangci.yml +++ b/eng/.golangci.yml @@ -2,4 +2,4 @@ run: # default is true. Enables skipping of directories: # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ - skip-dirs-use-default: true \ No newline at end of file + skip-dirs-use-default: true diff --git a/eng/pipelines/templates/steps/analyze.yml b/eng/pipelines/templates/steps/analyze.yml index a610d12588f8..ddbe4abc5074 100644 --- a/eng/pipelines/templates/steps/analyze.yml +++ b/eng/pipelines/templates/steps/analyze.yml @@ -20,7 +20,7 @@ steps: arguments: 'sdk/${{ parameters.ServiceDirectory }}' - script: | - go install github.com/golangci/golangci-lint/cmd/golangci-lint@${{parameters.LintVersion}} + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${{parameters.LintVersion}} golangci-lint --version displayName: 'Install GoLintCLI and dependencies.' workingDirectory: $(System.DefaultWorkingDirectory) @@ -35,6 +35,7 @@ steps: displayName: 'Lint' failOnStderr: false workingDirectory: $(System.DefaultWorkingDirectory) + continueOnError: true - pwsh: | $modDirs = ./eng/scripts/get_module_dirs.ps1 '${{ parameters.ServiceDirectory }}' From 41bf169785a8e11d2a30392d3f94fd73d856cea8 Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Thu, 3 Feb 2022 16:09:57 -0800 Subject: [PATCH 2/2] skip on linter install failure --- eng/pipelines/templates/steps/analyze.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/templates/steps/analyze.yml b/eng/pipelines/templates/steps/analyze.yml index ddbe4abc5074..38457a1c53f3 100644 --- a/eng/pipelines/templates/steps/analyze.yml +++ b/eng/pipelines/templates/steps/analyze.yml @@ -24,6 +24,7 @@ steps: golangci-lint --version displayName: 'Install GoLintCLI and dependencies.' workingDirectory: $(System.DefaultWorkingDirectory) + continueOnError: true - pwsh: | $modDirs = ./eng/scripts/get_module_dirs.ps1 '${{ parameters.ServiceDirectory }}'