mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
add override support to qgisstyle
include pep8 call in indentation run for python code
This commit is contained in:
parent
47488f280d
commit
10e09bc76b
@ -29,11 +29,19 @@ if [ -z "$ASTYLE" ]; then
|
||||
fi
|
||||
|
||||
if ! type -p flip >/dev/null; then
|
||||
echo "flip not found" >&2
|
||||
flip() {
|
||||
:
|
||||
}
|
||||
fi
|
||||
|
||||
if ! type -p pep8 >/dev/null; then
|
||||
echo "pep8 not found" >&2
|
||||
pep8() {
|
||||
:
|
||||
}
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
export ARTISTIC_STYLE_OPTIONS="\
|
||||
@ -60,7 +68,7 @@ $ARTISTIC_STYLE_OPTIONS \
|
||||
|
||||
for f in "$@"; do
|
||||
case "$f" in
|
||||
src/app/gps/qwtpolar-*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/ext-libs/*|src/providers/spatialite/qspatialite/*|src/plugins/dxf2shp_converter/dxflib/src/*|src/plugins/globe/osgEarthQt/*|src/plugins/globe/osgEarthUtil/*)
|
||||
src/app/gps/qwtpolar-*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/ext-libs/*|src/providers/spatialite/qspatialite/*|src/plugins/dxf2shp_converter/dxflib/src/*|src/plugins/globe/osgEarthQt/*|src/plugins/globe/osgEarthUtil/*|python/ext-libs/*|*/ui_*.py)
|
||||
echo -ne "$f skipped $elcr"
|
||||
continue
|
||||
;;
|
||||
@ -73,11 +81,11 @@ for f in "$@"; do
|
||||
cmd=:
|
||||
;;
|
||||
|
||||
python/ext-libs/*)
|
||||
cmd=:
|
||||
*.py)
|
||||
cmd="pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701"
|
||||
;;
|
||||
|
||||
*.py|*.sip)
|
||||
*.sip)
|
||||
cmd="perl -i.prepare -pe 's/[\r\t ]+$//;'"
|
||||
;;
|
||||
|
||||
|
@ -57,6 +57,7 @@ const string ASResource::AS_CATCH = string("catch");
|
||||
const string ASResource::AS_FINALLY = string("finally");
|
||||
const string ASResource::AS_THROWS = string("throws");
|
||||
const string ASResource::AS_CONST = string("const");
|
||||
const string ASResource::AS_OVERRIDE = string("override");
|
||||
|
||||
const string ASResource::AS_ASM = string("asm");
|
||||
|
||||
@ -211,6 +212,7 @@ void ASResource::buildHeaders(vector<const string*> &headers, int fileType, bool
|
||||
headers.push_back(&AS_STATIC);
|
||||
headers.push_back(&AS_EXTERN);
|
||||
headers.push_back(&AS_TEMPLATE);
|
||||
headers.push_back(&AS_OVERRIDE);
|
||||
}
|
||||
|
||||
if (fileType == JAVA_TYPE)
|
||||
@ -282,6 +284,7 @@ void ASResource::buildNonParenHeaders(vector<const string*> &nonParenHeaders, in
|
||||
nonParenHeaders.push_back(&AS_STATIC);
|
||||
nonParenHeaders.push_back(&AS_EXTERN);
|
||||
nonParenHeaders.push_back(&AS_TEMPLATE);
|
||||
nonParenHeaders.push_back(&AS_OVERRIDE);
|
||||
}
|
||||
|
||||
if (fileType == JAVA_TYPE)
|
||||
|
@ -118,6 +118,7 @@ class ASResource
|
||||
static const string AS_CLASS, AS_STRUCT, AS_UNION, AS_INTERFACE, AS_NAMESPACE, AS_EXTERN;
|
||||
static const string AS_STATIC;
|
||||
static const string AS_CONST;
|
||||
static const string AS_OVERRIDE;
|
||||
static const string AS_SYNCHRONIZED;
|
||||
static const string AS_OPERATOR, AS_TEMPLATE;
|
||||
static const string AS_OPEN_BRACKET, AS_CLOSE_BRACKET;
|
||||
|
Loading…
x
Reference in New Issue
Block a user