hashicorp / hashicorp/consul

Improve Documentation for configuration entry to cli option mappings

Open
#4,072 0 comments 3 reactions 0 assignees View on GitHub
theme/cli type/docs
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

Errors related to configuration entries not being enabled/disabled will output messages that mention configuration entries but not the command line options.

An example is the -enable-script-checks cli option and enable_script_checks configuration entry. We check the configuration [here](https://github.com/hashicorp/consul/blob/2e2cf8df34abf93c0384a7ef0a720f2e69a64580/agent/agent.go#L1689-L1691) and the output message mentions only enable_script_checks. Our [documentation for the configuration entries](https://www.consul.io/docs/agent/options.html#enable_script_checks) does mention that -enable-script-checks is the corresponding cli option. However the documentation for the cli option does not mention it can be configured with enable_script_checks in the configuration.

I propose 2 things.

1. We update our documentation so that information about the CLI options also points to the corresponding configuration entries (just like the config entries point to the CLI options)
2. We update the `consul agent` usage message to include information about what config entries the cli options correspond to. That way if someone is grepping the output for a particular config they saw in an error message then it will be easy to find.

One thing that seems to be standard and I dont think we should change is that all error messages are output the configuration entry names, not the cli option names.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.