File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 6
6
7
7
- Short version of ` --migrate-modules ` option to ` odoo-helper ci do-forwardport ` : ` --mm ` .
8
8
So, now forwardport command could look like: ` odoo-helper ci do-forward-port -s 12.0 --mm `
9
+ - Automatically detect ` .jslintrc ` placed in repo root directory. If found, then apply it to pylint by default.
9
10
10
11
## Release 0.12.1 (2021-10-25)
11
12
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ function lint_run_pylint {
85
85
local pylint_rc
86
86
local pylint_opts;
87
87
local pylint_disable=" manifest-required-author" ;
88
+ local guess_jslintrc=1;
88
89
89
90
pylint_rc=$( config_get_default_tool_conf " pylint_odoo.cfg" ) ;
90
91
@@ -99,12 +100,26 @@ function lint_run_pylint {
99
100
pylint_opts+=( " $1 " );
100
101
elif [[ " $1 " =~ --pylint-conf= (.+) ]]; then
101
102
pylint_rc=$( config_get_default_tool_conf " ${BASH_REMATCH[1]} " )
103
+ elif [[ " $1 " =~ --jslintrc.* ]]; then
104
+ guess_jslintrc=0;
105
+ pylint_opts+=( " $1 " );
102
106
else
103
107
pylint_opts+=( " $1 " );
104
108
fi
105
109
shift ;
106
110
done
107
111
112
+ if ! git_is_git_repo " $1 " ; then
113
+ guess_jslintrc=0;
114
+ else
115
+ local repo_path;
116
+ repo_path=$( git_get_abs_repo_path " $1 " ) ;
117
+ if [ -e " ${repo_path} /.jslintrc" ]; then
118
+ echoe -e " ${BLUEC} INFO${NC} : Applying auto-detected repo-wide jslintrc ${BLUEC}${repo_path} /.jslintrc${NC} ." ;
119
+ pylint_opts+=( " --jslintrc" " ${repo_path} /.jslintrc" );
120
+ fi
121
+ fi
122
+
108
123
# specify valid odoo version for pylint manifest version check
109
124
pylint_opts+=( " --rcfile=$pylint_rc " " --valid_odoo_versions=$ODOO_VERSION " );
110
125
You can’t perform that action at this time.
0 commit comments