databricks-cli/cmd/bundle
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
..
debug Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
deployment Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
generate Add error checking in tests and enable errcheck there (#1980) 2024-12-09 13:56:41 +01:00
utils Improve `bundle validate` output (#1532) 2024-07-01 09:01:10 +00:00
bundle.go Add command to open a resource in the browser (#1846) 2024-10-24 12:20:33 +00:00
debug.go Add `bundle debug terraform` command (#1294) 2024-04-02 12:56:27 +00:00
deploy.go Add `bundle summary` to display URLs for deployed resources (#1731) 2024-10-18 06:45:47 +00:00
destroy.go Do not execute build on bundle destroy (#1882) 2024-11-07 09:31:49 +00:00
generate.go Add bundle generate variant for dashboards (#1847) 2024-10-29 11:51:59 +00:00
init.go Fix template initialization when running on Databricks (#1912) 2024-11-20 11:42:23 +00:00
init_test.go Make dbt-sql and default-sql templates public (#1463) 2024-06-04 08:57:13 +00:00
launch.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
open.go Add command to open a resource in the browser (#1846) 2024-10-24 12:20:33 +00:00
run.go Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
schema.go Make bundle JSON schema modular with `$defs` (#1700) 2024-09-10 13:55:18 +00:00
summary.go Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
sync.go Add "output" flag to the bundle sync command (#1853) 2024-10-23 11:08:12 +00:00
test.go Make bundle loaders return diagnostics (#1319) 2024-03-28 10:32:34 +00:00
validate.go Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
variables.go Added `bundle deployment bind` and `unbind` command (#1131) 2024-02-14 18:04:45 +00:00