mirror of https://github.com/databricks/cli.git
8d5351c1c3
## 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. |
||
---|---|---|
.. | ||
args.go | ||
auth.go | ||
auth_options.go | ||
auth_options_test.go | ||
auth_test.go | ||
bundle.go | ||
bundle_test.go | ||
io.go | ||
logger.go | ||
progress_logger.go | ||
progress_logger_test.go | ||
root.go | ||
silent_err.go | ||
user_agent.go | ||
user_agent_command.go | ||
user_agent_command_exec_id.go | ||
user_agent_command_exec_id_test.go | ||
user_agent_command_test.go | ||
user_agent_upstream.go | ||
user_agent_upstream_test.go |