pulumi/sdk/go/common/workspace
bors[bot] 1aae5868af
Merge #12461
12461: ci-lint: Upgrade to golangci-lint v1.52 r=abhinav a=abhinav

The new release pulls in revive 1.3 which changed its default ruleset.
With the new rule set, here are the failures we see:

```
% cat pkg/lint.txt sdk/lint.txt tests/lint.txt | cut -d: -f4 | sort | uniq -c
  39  empty-block
  11  if-return
  67  redefines-builtin-id
   5  superfluous-else
 589  unused-parameter
 ```

This PR upgrades pu/pu to the latest release of golangci-lint,
and either fixes or excludes linters on a case-by-case basis.

Each commit is individually reviewable,
and elaborates on the rationale for disabling linter rules,
but in short:

- unused-parameter: parameter names are useful,
  and the benefit we'd get from fixing 500+ instances of this
  is questionable
- empty-block: revive has undesirable false positives on this
- redefines-builtin-id: we keep this rule except for 'new',
  which we use frequently in the context of 'old' and 'new'
  properties.

The last commit in this PR fixes all issues not ignored above,
and includes the full list of fixed issues in the commit message.


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-03-21 17:46:13 +00:00
..
config.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
creds.go all: Fix revive issues 2023-03-21 08:55:11 -07:00
creds_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
loaders.go Remove the global caches for project files 2023-03-07 12:44:24 +00:00
paths.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
paths_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
plugins.go Move automatic plugin-install to engine 2023-03-20 23:41:07 +00:00
plugins_install_nodejs_test.go ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
plugins_install_python_test.go ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
plugins_install_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
plugins_test.go Move automatic plugin-install to engine 2023-03-20 23:41:07 +00:00
project.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
project.json fix #11864: pulumi panics when Pulumi.yaml has a provider with an empty/unspecified `path` key 2023-01-18 10:33:39 -08:00
project_test.go Test project roundtrips 2023-03-07 09:42:56 +00:00
settings.go move pkg/workspace -> sdk/go/common/workspace 2020-03-18 14:35:53 -07:00
templates.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
templates_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
workspace.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00