esunar / test4

GNU General Public License v3.0
0 stars 0 forks source link

check for presence of config file as mentioned in the README #212

Open esunar opened 2 years ago

esunar commented 2 years ago

Currently, the README mentions a standard place for configuration options(~/.config/juju-lint/config.yaml ), however, when invoking juju-lint, it requires the config file to be passed in explicitly. It would be nice if juju-lint can check for the presence automatically if not invoked explicitly.

Example failure:

$ juju-lint 2021_08_10_bundle.yaml -t openstack --output-dir juju-lint-output
2021-08-10 16:46:33 [ERROR] Cloud not locate rules file lint-rules.yaml

instead of:

$ juju-lint 2021_08_10_bundle.yaml -t openstack --output-dir juju-lint-output -c /snap/juju-lint/current/contrib/canonical-rules.yaml

rules is an entry in the config, which points to /snap/juju/.... as the location for the rules file. It woudld be great if this could get detected and used automatically.


Imported from Launchpad using lp2gh.