summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-11-07 10:42:54 -0500
committerScott Moser <smoser@ubuntu.com>2012-11-07 10:42:54 -0500
commit21a3cf3186809f9dae387e52e8bd9bc548981003 (patch)
treed82d3c05e0f295ad2dda2dee5d0ca5b6ab116b78 /tools
parente6d4b76e5e60ff558c247ad76acd27343afe367c (diff)
parent8b677bc80a39a0eb1a3cc7989c6bffb959fc7a69 (diff)
downloadvyos-cloud-init-21a3cf3186809f9dae387e52e8bd9bc548981003.tar.gz
vyos-cloud-init-21a3cf3186809f9dae387e52e8bd9bc548981003.zip
test and path cleanups.
1. Remove the usage of the path.join function now that all code should be going through the util file methods (and they can be mocked out as needed). 2. Adjust all occurences of the above join function to either not use it or replace it with the standard os.path.join (which can also be mocked out as needed) 3. Fix pylint from complaining about the tests folder 'helpers.py' not being found. 4. Add a pylintrc file that is used instead of the options hidden in the 'run_pylint' tool.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run-pylint19
1 files changed, 6 insertions, 13 deletions
diff --git a/tools/run-pylint b/tools/run-pylint
index 7ef44ac5..b74efda9 100755
--- a/tools/run-pylint
+++ b/tools/run-pylint
@@ -6,23 +6,16 @@ else
files=( "$@" );
fi
+RC_FILE="pylintrc"
+if [ ! -f $RC_FILE ]; then
+ RC_FILE="../pylintrc"
+fi
+
cmd=(
pylint
- --reports=n
- --include-ids=y
- --max-line-length=79
-
+ --rcfile=$RC_FILE
--disable=R
--disable=I
-
- --disable=W0142 # Used * or ** magic
- --disable=W0511 # TODO/FIXME note
- --disable=W0702 # No exception type(s) specified
- --disable=W0703 # Catch "Exception"
-
- --disable=C0103 # Invalid name
- --disable=C0111 # Missing docstring
-
"${files[@]}"
)