pulumi/pkg/resource/deploy
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
..
deploytest all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
providers Move automatic plugin-install to engine 2023-03-20 23:41:07 +00:00
builtins.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
deployment.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
deployment_executor.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
deployment_executor_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
deployment_test.go Remove source_fixed 2022-11-08 15:55:45 +00:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
import.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
manifest.go Split Manifest type to it's own file (#8712) 2022-01-10 12:25:24 +00:00
plan.go all: Fix revive issues 2023-03-21 08:55:11 -07:00
snapshot.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
snapshot_test.go all: Fix revive issues 2023-03-21 08:55:11 -07:00
source.go Monitor.Invoke and Provider.Invoke take different arguments (#9323) 2022-04-14 10:59:46 +01:00
source_error.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
source_eval.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
source_eval_test.go all: Don't use cmdutil.Diag in tests 2023-03-13 12:54:04 -07:00
source_null.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
source_query.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
source_query_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
state_builder.go all: Fix revive issues 2023-03-21 08:55:11 -07:00
state_builder_test.go Non-mutating snapshot normalization (#10128) 2022-07-18 14:04:19 -04:00
step.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
step_executor.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
step_generator.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
step_generator_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
target.go Add getOrganization to nodejs and python (#10504) 2022-08-31 10:33:29 +01:00