Skip to content

Commit

Permalink
Code review: 259740043: Added readthedocs update triggers and changes…
Browse files Browse the repository at this point in the history
… for pylint log2timeline#270
  • Loading branch information
joachimmetz committed Dec 31, 2015
1 parent 394a171 commit 14ee7ad
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 583 deletions.
2 changes: 1 addition & 1 deletion config/dpkg/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ python-plaso (1.3.1-1) unstable; urgency=low

* Auto-generated

-- Log2Timeline <[email protected]> Fri, 24 Jul 2015 20:01:39 +0200
-- Log2Timeline <[email protected]> Tue, 28 Jul 2015 16:44:58 +0200
2 changes: 1 addition & 1 deletion plaso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__version__ = '1.3.1'

VERSION_DEV = True
VERSION_DATE = '20150724'
VERSION_DATE = '20150728'


def GetVersion():
Expand Down
27 changes: 27 additions & 0 deletions utils/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,19 @@ linting_is_correct_remote_origin()
# First find all files that need linter
FILES=`git status -s | grep -v "^?" | awk "{ ${AWK_SCRIPT} }" | grep "\.py$"`;

# Determine the current pylint version.
PYLINT_VERSION=`pylint --version 2> /dev/null | awk '/pylint/ {print $2}' | rev | cut -c2- | rev`;

# Check if pylint version is < 1.4.0
# The following sed operation mimics 'sort -V' since it is not available on Mac OS X
RESULT=`echo -e "${PYLINT_VERSION}\n1.3.99" | sed 's/^[0-9]\./0&/; s/\.\([0-9]\)$/.0\1/; s/\.\([0-9]\)\./.0\1./g;s/\.\([0-9]\)\./.0\1./g' | sort | sed 's/^0// ; s/\.0/./g' | head -n1`;

if test "${RESULT}" = "${PYLINT_VERSION}";
then
echo "pylint verion 1.4.0 or later required.";

exit ${EXIT_FAILURE};
fi
LINTER="pylint --rcfile=utils/pylintrc"

echo "Running linter on changed files.";
Expand Down Expand Up @@ -195,6 +208,19 @@ linting_is_correct_remote_origin()
# Version for usage with remote upstream
linting_is_correct_remote_upstream()
{
# Determine the current pylint version.
PYLINT_VERSION=`pylint --version 2> /dev/null | awk '/pylint/ {print $2}' | rev | cut -c2- | rev`;

# Check if pylint version is < 1.4.0
# The following sed operation mimics 'sort -V' since it is not available on Mac OS X
RESULT=`echo -e "${PYLINT_VERSION}\n1.3.99" | sed 's/^[0-9]\./0&/; s/\.\([0-9]\)$/.0\1/; s/\.\([0-9]\)\./.0\1./g;s/\.\([0-9]\)\./.0\1./g' | sort | sed 's/^0// ; s/\.0/./g' | head -n1`;

if test "${RESULT}" = "${PYLINT_VERSION}";
then
echo "pylint verion 1.4.0 or later required.";

exit ${EXIT_FAILURE};
fi
echo "Running linter.";

LINTER="pylint --rcfile=utils/pylintrc";
Expand Down Expand Up @@ -229,6 +255,7 @@ linting_is_correct_remote_upstream()
then
# TODO: allow lint all before erroring.
echo "Fix linter errors before proceeding.";

return ${FALSE};
fi
done
Expand Down
6 changes: 6 additions & 0 deletions utils/merge_submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ CL_NUMBER=$1;
USERNAME=$2;
FEATURE_BRANCH=$3;

GITHUB_URL="https://github.com/${USERNAME}/${PROJECT_NAME}.git";

if ! ${HAVE_REMOTE_ORIGIN};
then
echo "Submit aborted - invalid origin";
Expand Down Expand Up @@ -112,6 +114,10 @@ then

exit ${EXIT_FAILURE};
fi
# Trigger a readthedocs build for the docs.
# The plaso readthedocs content is mirrored with the wiki repo
# and has no trigger on update webhook for readthedocs.
curl -X POST http://readthedocs.org/build/plaso
fi

URL_CODEREVIEW="https://codereview.appspot.com";
Expand Down
10 changes: 4 additions & 6 deletions utils/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,19 @@ load-plugins=
# R0915: Too many statements (N/50)
# R0921: Abstract class not referenced
# R0922: Abstract class is only referenced 1 times
# R0924: Badly implemented Container, implements __len__ but not __getitem__ (incomplete-protocol) (pylint 0.26 and later)
# W0122: Use of the exec statement
# W0141: Used builtin function ''
# W0142: Used * or ** magic
# W0201: Variables defined initially outside the scope of __init__ (reconsider this, added by Kristinn).
# W0212: Locally enabling protected-access
# W0402: Uses of a deprecated module 'string'
# W0404: 41: Reimport 'XX' (imported line NN)
# W0511: TODO
# W0603: Using the global statement
# W0703: Catch "Exception"
# W1201: Specify string format arguments as logging function parameters
# W0201: Variables defined initially outside the scope of __init__ (reconsider this, added by Kristinn).
disable=C0103,C0111,C0302,F0401,I0010,I0011,R0201,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,R0924,W0122,W0141,W0142,W0402,W0404,W0511,W0603,W0703,W1201,W0201
# W1202: Use % formatting in logging functions but pass the % parameters as arguments
disable=C0103,C0111,C0302,F0401,I0010,I0011,R0201,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,W0122,W0141,W0142,W0201,W0212,W0402,W0404,W0511,W0603,W0703,W1201,W1202


[REPORTS]
Expand All @@ -80,9 +81,6 @@ disable=C0103,C0111,C0302,F0401,I0010,I0011,R0201,R0801,R0901,R0902,R0903,R0904,
# (visual studio) and html
output-format=text

# Include message's id in output
include-ids=yes

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
Expand Down
Loading

0 comments on commit 14ee7ad

Please sign in to comment.