pulumi/pkg/codegen/nodejs
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
..
gen_program_test all: gofmt -w -s 2023-01-10 19:03:24 -08:00
tstypes all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
doc.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
doc_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
gen.go all: Fix revive issues 2023-03-21 08:55:11 -07:00
gen_fileinfo.go [codegen/node] Implement support for lazy-loaded Node modules (#10538) 2022-09-01 18:42:44 -04:00
gen_intrinsics.go Update error handling (#8406) 2021-11-12 18:37:17 -08:00
gen_lazyloads.go pkg/codegen/nodejs: Prefer contract.Assertf over Assert 2023-03-01 13:22:32 -08:00
gen_lazyloads_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
gen_program.go Implement description as comments or docstring for config variables in program-gen 2023-03-21 15:01:16 +01:00
gen_program_expressions.go nodejs pcl components, initial commit 2023-03-14 16:17:14 +01:00
gen_program_lower.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
gen_program_test.go fix(ci): Split programgen tests over more jobs 2022-10-16 23:20:45 -07:00
gen_program_utils.go Add "NotImplemented" PCL function intrinsic 2023-03-10 12:14:28 +01:00
gen_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
importer.go [codegen/node] Implement support for lazy-loaded Node modules (#10538) 2022-09-01 18:42:44 -04:00
test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
utilities.go pkg/codegen/nodejs: Prefer contract.Assertf over Assert 2023-03-01 13:22:32 -08:00
utilities_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00