pulumi/pkg/resource/deploy
Will Jones c496921d44
Enable some more linting rules (#17456)
Issue #10659 lists a number of extra linting checks that we could enable
in order to make our Go code more robust. This commit implements as many
as seem sensible:

* `durationcheck`, which checks for multiplication of `time.Duration`s,
which can lead to unexpected behaviour (e.g. `time.Second * time.Second`
is *not* one second)
* `goprintffuncname`, which checks that `Printf`-like functions are
appropriately suffixed with `f` to indicate as such
* `tenv`, which checks for `os.Setenv` in tests where `t.Setenv` is
generally a better solution
* `wastedassign`, which checks for assignments whose values are never
used (such as initial values before an `if` where both branches then
overwrite the value)
* `whitespace`, which checks for blank lines at the beginning and end of
blocks such as functions, `if`s, `for`s and so on.

This commit does *not* enable the following checks listed in #10659:

* `wrapcheck`, which insists that third-party library errors are always
`%w`rapped -- we have a lot of cases where we don't do this and it's
probably a bit more involved than "just wrap them" in terms of making
sure we don't break anything (maybe)
* `predeclared`, which checks for shadowing of existing Go identifiers
-- we use `old` and `new` a lot, especially in step generation, so this
is probably a slightly bigger clean-up/one we might want to opt out of
* `mnd` (magic number detection) -- we have a lot of failures on this
* `nilnil` -- we only have a couple of failures on this; these could
probably be handled with `//nolint` but for now I've opted not to take
this route.
2024-10-03 17:37:13 +00:00
..
deploytest Have `Host.Provider` accept a `PackageDescriptor` (#17244) 2024-09-12 13:17:30 +00:00
providers Have `Host.Provider` accept a `PackageDescriptor` (#17244) 2024-09-12 13:17:30 +00:00
builtins.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
builtins_test.go Normalize plugin.Provider methods to (Context, Request) -> (Response, error) (#16302) 2024-06-07 19:47:49 +00:00
deployment.go implement the engine bits for debugging support (#17072) 2024-08-30 10:31:28 +00:00
deployment_executor.go Centralize resource state dependency traversal (#17320) 2024-09-23 08:37:34 +00:00
deployment_executor_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
deployment_test.go Introduce snapshot metadata (#17430) 2024-09-30 16:45:40 +00:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
import.go Extend the TestReplacementParameterizedProvider test (#16644) 2024-07-15 08:33:36 +00:00
import_test.go Have `Host.Provider` accept a `PackageDescriptor` (#17244) 2024-09-12 13:17:30 +00:00
manifest.go Split Manifest type to it's own file (#8712) 2022-01-10 12:25:24 +00:00
manifest_test.go Refactor: move plugin kind to apitype (#15946) 2024-04-25 17:30:30 +00:00
plan.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
plan_test.go [ci] `pkg/resource/deploy` coverage (#14831) 2023-12-19 16:14:40 +00:00
snapshot.go Return pruned resources from `Snapshot.Prune` (#17454) 2024-10-02 12:14:40 +00:00
snapshot_test.go Return pruned resources from `Snapshot.Prune` (#17454) 2024-10-02 12:14:40 +00:00
source.go allow component providers to return more detailed error messages (#17306) 2024-09-25 15:38:36 +00:00
source_error.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
source_error_test.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
source_eval.go send a value to the abortchan instead of closing it (#17439) 2024-10-01 12:41:29 +00:00
source_eval_test.go send a value to the abortchan instead of closing it (#17439) 2024-10-01 12:41:29 +00:00
source_null.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
source_query.go allow component providers to return more detailed error messages (#17306) 2024-09-25 15:38:36 +00:00
source_query_test.go allow component providers to return more detailed error messages (#17306) 2024-09-25 15:38:36 +00:00
state_builder.go Revert "Revert "Run integration tests and dev builds with race detection" (#15998)" (#16148) 2024-05-09 16:15:41 +00:00
state_builder_test.go When changing parents also fix URNs (#13935) 2023-09-14 19:52:27 +00:00
step.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00
step_executor.go Use int32 in Go interfaces that map to protobufs using int32 (#17068) 2024-08-28 13:45:17 +00:00
step_executor_test.go Clean up deployment options (#16357) 2024-06-11 13:37:57 +00:00
step_generator.go Fix dependency traversal for untargeted skipped creates (#17340) 2024-09-23 15:02:37 +00:00
step_generator_test.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00
step_test.go Add input keys from diff during import step to warning and error message (#17312) 2024-09-25 13:21:50 +00:00
target.go Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
target_test.go upgrade to latest version of golangci-lint (#15977) 2024-04-19 06:20:33 +00:00