databricks-cli/libs/dyn/convert
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
..
end_to_end_test.go Fix conversion of zero valued scalar pointers to a dynamic value (#1433) 2024-05-21 11:53:00 +00:00
error.go Rename libs/config -> libs/dyn (#1086) 2023-12-22 13:20:45 +00:00
from_typed.go Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
from_typed_test.go Track multiple locations associated with a `dyn.Value` (#1510) 2024-07-16 11:27:27 +00:00
normalize.go Enable errcheck everywhere and fix or silent remaining issues (#1987) 2024-12-11 13:26:00 +01:00
normalize_test.go Add error checking in tests and enable errcheck there (#1980) 2024-12-09 13:56:41 +01:00
struct_info.go Make `TableName` field part of quality monitor schema (#1903) 2024-11-14 17:39:38 +00:00
struct_info_test.go Define `dyn.Mapping` to represent maps (#1301) 2024-03-25 11:01:09 +00:00
to_typed.go Added JSON input validation for CLI commands (#1771) 2024-10-11 14:39:53 +00:00
to_typed_test.go Added JSON input validation for CLI commands (#1771) 2024-10-11 14:39:53 +00:00