Closed usev6 closed 5 years ago
The documentation for configuration files currently states:
Flags specified on the command line take final precedence and override all config file options.
IMHO that behaviour makes sense and I guess most users will expect that behaviour.
Unfortunately the opposite seems to be true: Options from config files will override options given on the command line:
$ git clone https://github.com/rodjek/puppet-lint.git $ cd puppet-lint $ echo '$foo = 42' > test.pp $ echo '--only-checks=80chars' > .puppet-lint.rc $ sed -i '/enabled_checks.each/a\ pp check' lib/puppet-lint/checks.rb ## debug output: all enabled checks $ ./bin/puppet-lint --only-checks=140chars test.pp ## config file has precedence over command line arg :"80chars" $ > .puppet-lint.rc $ ./bin/puppet-lint --only-checks=140chars test.pp ## it works with empty config file :"140chars"
The documentation for configuration files currently states:
IMHO that behaviour makes sense and I guess most users will expect that behaviour.
Unfortunately the opposite seems to be true: Options from config files will override options given on the command line: