Skip to content

Commit 1dbd094

Browse files
committed
Disable all checks for now
1 parent 8b8aa8a commit 1dbd094

File tree

2 files changed

+56
-33
lines changed

2 files changed

+56
-33
lines changed

dev/lint-python

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ SPARK_ROOT_DIR="$(dirname "$SCRIPT_DIR")"
2222
PATHS_TO_CHECK="./python/pyspark/ ./ec2/spark_ec2.py ./examples/src/main/python/ ./dev/sparktestsupport"
2323
PATHS_TO_CHECK="$PATHS_TO_CHECK ./dev/run-tests.py ./python/run-tests.py"
2424
PYTHON_LINT_REPORT_PATH="$SPARK_ROOT_DIR/dev/python-lint-report.txt"
25+
PYLINT_REPORT_PATH="$SPARK_ROOT_DIR/dev/pylint-report.txt"
2526

2627
cd "$SPARK_ROOT_DIR"
2728

@@ -47,6 +48,23 @@ if [ ! -e "$PEP8_SCRIPT_PATH" ]; then
4748
fi
4849
fi
4950

51+
# Easy install pylint in /dev/pylint. To easy_install into a directory, the PYTHONPATH should
52+
# be set to the directory.
53+
# dev/pylint should be appended to the PATH variable as well.
54+
export "PYTHONPATH=$SPARK_ROOT_DIR/dev/pylint"
55+
export "PYLINT_HOME=$PYTHONPATH"
56+
export "PATH=$PYTHONPATH:$PATH"
57+
58+
if [ ! -d "$PYLINT_HOME" ]; then
59+
mkdir "$PYLINT_HOME"
60+
easy_install -d "$PYLINT_HOME" pylint
61+
easy_install_status="$?"
62+
63+
if [ "$easy_install_status" -ne 0 ]; then
64+
echo "Unable to install pylint locally in \"$PYTHONPATH\"."
65+
fi
66+
fi
67+
5068
# There is no need to write this output to a file
5169
#+ first, but we do so so that the check status can
5270
#+ be output before the report, like with the
@@ -61,35 +79,28 @@ else
6179
fi
6280

6381
if [ "$lint_status" -ne 0 ]; then
64-
echo "Python lint checks failed."
82+
echo "PEP8 checks failed."
6583
cat "$PYTHON_LINT_REPORT_PATH"
6684
else
67-
echo "Python lint checks passed."
85+
echo "PEP8 checks passed."
6886
fi
6987

70-
# rm "$PEP8_SCRIPT_PATH"
7188
rm "$PYTHON_LINT_REPORT_PATH"
7289

73-
# Easy install pylint in /dev/pylint. To easy_install into a directory, the PYTHONPATH should
74-
# be set to the directory.
75-
# dev/pylint should be appended to the PATH variable as well.
76-
export "PYTHONPATH=$SPARK_ROOT_DIR/dev/pylint"
77-
export "PYLINT_HOME=$PYTHONPATH"
78-
export "PATH=$PYTHONPATH:$PATH"
7990

80-
if [ ! -d "$PYLINT_HOME" ]; then
81-
mkdir "$PYLINT_HOME"
82-
easy_install -d "$PYLINT_HOME" pylint
83-
easy_install_status="$?"
91+
for to_be_checked in "$PATHS_TO_CHECK"
92+
do
93+
pylint --rcfile="$PYLINT_HOME/pylintrc" $to_be_checked >> "$PYLINT_REPORT_PATH"
94+
done
8495

85-
if [ "$easy_install_status" -ne 0 ]; then
86-
echo "Unable to install pylint locally in \"$PYTHONPATH\"."
87-
fi
96+
if [ "${PIPESTATUS[0]}" -ne 0 ]; then
97+
lint_status=0
98+
echo "Pylint checks failed."
99+
cat "$PYLINT_REPORT_PATH"
100+
else
101+
echo "Pylint checks passed."
88102
fi
89103

90-
# for to_be_checked in "$PATHS_TO_CHECK"
91-
# do
92-
# pylint --rcfile="$PYLINT_HOME/pylintrc" $to_be_checked
93-
# done
104+
rm "$PYLINT_REPORT_PATH"
94105

95106
exit "$lint_status"

dev/pylint/pylint.config renamed to dev/pylint/pylintrc

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
118
[MASTER]
219

320
# Specify a configuration file.
@@ -12,7 +29,7 @@ profile=no
1229

1330
# Add files or directories to the blacklist. They should be base names, not
1431
# paths.
15-
ignore=CVS
32+
ignore=pyspark.heapq3
1633

1734
# Pickle collected data for later comparisons.
1835
persistent=yes
@@ -21,14 +38,6 @@ persistent=yes
2138
# usually to register additional checkers.
2239
load-plugins=
2340

24-
# Deprecated. It was used to include message's id in output. Use --msg-template
25-
# instead.
26-
include-ids=no
27-
28-
# Deprecated. It was used to include symbolic ids of messages in output. Use
29-
# --msg-template instead.
30-
symbols=no
31-
3241
# Use multiple processes to speed up Pylint.
3342
jobs=1
3443

@@ -59,7 +68,7 @@ confidence=
5968
# Enable the message, report, category or checker with the given id(s). You can
6069
# either give multiple identifier separated by comma (,) or put this option
6170
# multiple time. See also the "--disable" option for examples.
62-
#enable=
71+
enable=
6372

6473
# Disable the message, report, category or checker with the given id(s). You
6574
# can either give multiple identifiers separated by comma (,) or put this
@@ -70,7 +79,10 @@ confidence=
7079
# --enable=similarities". If you want to run only the classes checker, but have
7180
# no Warning level messages displayed, use"--disable=all --enable=classes
7281
# --disable=W"
73-
disable=E1608,W1627,E1601,E1603,E1602,E1605,E1604,E1607,E1606,W1621,W1620,W1623,W1622,W1625,W1624,W1609,W1608,W1607,W1606,W1605,W1604,W1603,W1602,W1601,W1639,W1640,I0021,W1638,I0020,W1618,W1619,W1630,W1626,W1637,W1634,W1635,W1610,W1611,W1612,W1613,W1614,W1615,W1616,W1617,W1632,W1633,W0704,W1628,W1629,W1636
82+
83+
# These errors are arranged in order of number of warning given in pylint.
84+
85+
disable=invalid-name,missing-docstring,protected-access,unused-argument,no-member,unused-wildcard-import,redefined-builtin,too-many-arguments,unused-variable,too-few-public-methods,bad-continuation,duplicate-code,redefined-outer-name,too-many-ancestors,import-error,superfluous-parens,unused-import,line-too-long,no-name-in-module,unnecessary-lambda,import-self,no-self-use,unidiomatic-typecheck,fixme,too-many-locals,cyclic-import,too-many-branches,bare-except,wildcard-import,dangerous-default-value,broad-except,too-many-public-methods,deprecated-lambda,anomalous-backslash-in-string,too-many-lines,reimported,too-many-statements,bad-whitespace,unpacking-non-sequence,too-many-instance-attributes,abstract-method,old-style-class,global-statement,attribute-defined-outside-init,arguments-differ,undefined-all-variable,no-init,useless-else-on-loop,super-init-not-called,notimplemented-raised,blacklisted-name,trailing-whitespace,too-many-return-statements,pointless-string-statement,global-variable-undefined,bad-classmethod-argument,too-many-format-args,pointless-statement,parse-error,no-self-argument
7486

7587

7688
[REPORTS]
@@ -86,7 +98,7 @@ output-format=text
8698
files-output=no
8799

88100
# Tells whether to display a full report or only the messages
89-
reports=yes
101+
reports=no
90102

91103
# Python expression which should return a note less than 10 (10 is the highest
92104
# note). You have access to the variables errors warning, statement which
@@ -116,7 +128,7 @@ notes=FIXME,XXX,TODO
116128
required-attributes=
117129

118130
# List of builtins function names that should not be used, separated by a comma
119-
bad-functions=map,filter,input
131+
bad-functions=
120132

121133
# Good variable names which should always be accepted, separated by a comma
122134
good-names=i,j,k,ex,Run,_

0 commit comments

Comments
 (0)