Fix additional puppet-lint warnings and errors

This update addresses the following errors and warnings
from puppet-lint:
- 140chars
- case_without_default
- ensure_first_param
- inherits_across_namespaces
- parameter_order
- single_quote_string_with_variables
- variable_is_lowercase
- variable_scope

In the case of variable_is_lowercase, the compute.pp manifest
has variables with sizes like 2M in the name. These have been
left as-is, with lint:ignore comments for the check, due to
the semantics of the name.

For the 140chars check, certain long lines have been left as-is,
with lint:ignore comments, due to long commands being executed.
These can be revisited in a future update to try to break up
the lines and remove the lint:ignore directives.

Change-Id: I37809bacb43818e0956f9f434c30c48e05017325
Story: 2004515
Task: 28685
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney
2018-12-27 16:23:13 -06:00
parent b1a5be869d
commit b319a45b5e
25 changed files with 87 additions and 62 deletions

View File

@@ -25,15 +25,8 @@ setenv =
GEM_HOME = {envdir}
GEM_PATH = {envdir}
skip_tests = \
--no-140chars \
--no-autoloader_layout-check \
--no-case_without_default \
--no-documentation-check \
--no-ensure_first_param \
--no-inherits_across_namespaces \
--no-parameter_order \
--no-single_quote_string_with_variables \
--no-variable_is_lowercase-check
--no-documentation-check
commands =
gem install --no-document puppet-lint
bash -c "find {toxinidir} -name \*.pp -print0 | xargs -0 puppet-lint --fail-on-warnings {[testenv:puppetlint]skip_tests}"