pulumi/pkg/backend/display
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
..
internal/terminal Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
testdata Show the count of unchanged resources (#17257) 2024-09-17 08:41:53 +00:00
wasm [display] Enable WASM compilation (#16246) 2024-05-24 20:27:56 +00:00
diff.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00
diff_test.go Fix rendering of output events in rendering update diffs (#17029) 2024-08-27 18:37:03 +00:00
display.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00
display_test.go Include all engine events in the event log (#17101) 2024-08-30 10:31:19 +00:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
events.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
events_test.go Don't omit an empty detailedDiff (#15213) 2024-01-23 00:00:14 +00:00
json.go Fix deletes not being show in `refresh` when using json output (#16851) 2024-09-09 10:16:10 +00:00
jsonmessage.go Hide unnecessary rows in non-interactive mode (#17188) 2024-09-09 07:44:27 +00:00
object_diff.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00
object_diff_test.go Fix a panic in diff display when parsing YAML strings (#14710) 2023-12-02 01:24:13 +00:00
options.go Export a helper for rendering progress to a "simple" terminal (#17147) 2024-09-06 03:17:49 +00:00
progress.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00
progress_bar.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
progress_bar_test.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
progress_test.go Show the count of unchanged resources (#17257) 2024-09-17 08:41:53 +00:00
query.go Use events to report downloads as system messages (#17019) 2024-09-03 12:12:04 +00:00
rows.go Display `[retain]` in all cases of delete retention (#16506) 2024-06-28 23:19:26 +00:00
sigint_unix.go [cli] Reimplement the interactive renderer 2022-11-07 22:02:44 -08:00
sigint_windows.go [cli] Reimplement the interactive renderer 2022-11-07 22:02:44 -08:00
tableutil.go [color] Use graphemes to measure strings. 2022-11-09 08:23:00 -08:00
tree.go Show the count of unchanged resources (#17257) 2024-09-17 08:41:53 +00:00
tree_test.go Clean up display rewinding and wrapping (#17007) 2024-08-19 15:30:48 +00:00
watch.go Enable some more linting rules (#17456) 2024-10-03 17:37:13 +00:00