Temporary fix for Issue 636 by turning off the caching of the page's entities.
[Melange.git] / scripts / pylint / do_pylint.sh
blob2e3b4c9477fa24d1884c83ca6feb391aeaa34bd1
1 #!/bin/bash
2 # Copyright 2008 the Melange authors.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # Set some environmental variables for pylint and run it on Melange code
17 # To disable some of the checks use options listed below:
18 # disable unused imports: --disable-msg=W0611
19 # disable TODO: --disable-msg=W0511
20 # disable cyclic imports: --disable-msg=R0401
21 # disable report: --reports=no
22 # disable similarity check: --disable-checker=similarities
24 # Checks listed above are disabled in silent mode
25 # which can be run using --silent argument
27 SILENT_ARGS=""
28 ARGS=( "$@" )
30 if [ "$1" == "--silent" ]; then
31 SILENT_ARGS="--disable-msg=W0511,R0401 --reports=no --disable-checker=similarities"
32 ARGS[0]=""
35 PROJ_DIR=$(dirname "$0")/../..
36 PROJ_DIR=$(cd "$PROJ_DIR"; pwd)
37 APP_DIR="${PROJ_DIR}/app"
39 CHECK_MODULES="soc reflistprop settings.py urls.py main.py"
41 PYLINTRC=$(dirname "$0")/pylintrc
42 PYTHONPATH="${PYTHONPATH}:${PROJ_DIR}/app/:${PROJ_DIR}/thirdparty/google_appengine/"
44 export PYTHONPATH
45 export PYLINTRC
47 PYLINT_PATH=$(which pylint)
49 if [ "$PYLINT_PATH" = "" ]; then
50 echo >&2 "Cannot find pylint. Make sure pylint is in your PATH variable."
51 exit 1
54 CHECK_MODULES_PATHS=""
56 for x in $CHECK_MODULES
58 CHECK_MODULES_PATHS="${CHECK_MODULES_PATHS} ${APP_DIR}/${x}"
59 done
61 pylint $SILENT_ARGS $ARGS $CHECK_MODULES_PATHS
62 exit $?