databricks-cli/bundle/deploy
Denis Bilenko 8d5351c1c3
Enable errcheck everywhere and fix or silent remaining issues (#1987)
## Changes
Enable errcheck linter for the whole codebase.

Fix remaining complaints:
- If we can propagate error to caller, do that
- If we writing to stdout, continue ignoring errors (to avoid crashing
in "cli | head" case)
- Add exception for cobra non-critical API such as
MarkHidden/MarkDeprecated/RegisterFlagCompletionFunc. This keeps current
code and behaviour, to be decided later if we want to change this.
- Continue ignoring errors where that is desired behaviour (e.g.
git.loadConfig).
- Continue ignoring errors where panicking seems riskier than ignoring
the error.
- Annotate cases in libs/dyn with //nolint:errcheck - to be addressed
later.

Note, this PR is not meant to come up with the best strategy for each
case, but to be a relative safe change to enable errcheck linter.
  
## Tests
Existing tests.
2024-12-11 13:26:00 +01:00
..
files Properly read Git metadata when running inside workspace (#1945) 2024-12-05 10:13:13 +00:00
lock Show actionable errors for collaborative deployment scenarios (#1386) 2024-10-10 11:18:23 +00:00
metadata Rename `RootPath` -> `BundleRootPath` (#1792) 2024-09-27 10:03:05 +00:00
terraform Add golangci-lint v1.62.2 (#1953) 2024-12-04 17:40:19 +00:00
filer.go Added deployment state for bundles (#1267) 2024-03-18 14:41:58 +00:00
state.go Add UUID to uniquely identify a deployment state (#1595) 2024-07-16 10:01:58 +00:00
state_pull.go Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
state_pull_test.go Rename `RootPath` -> `BundleRootPath` (#1792) 2024-09-27 10:03:05 +00:00
state_push.go Add an error if state files grow bigger than the export limit (#1795) 2024-10-02 13:53:24 +00:00
state_push_test.go Rename `RootPath` -> `BundleRootPath` (#1792) 2024-09-27 10:03:05 +00:00
state_test.go Make fileset take optional list of paths to list (#1684) 2024-08-19 15:15:14 +00:00
state_update.go Add UUID to uniquely identify a deployment state (#1595) 2024-07-16 10:01:58 +00:00
state_update_test.go Rename `RootPath` -> `BundleRootPath` (#1792) 2024-09-27 10:03:05 +00:00