File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ run_lint() {
7979 # Lint Markdown files...
8080 files=$( echo " ${changed_files} " | grep ' \.md$' | tr ' \n' ' ' )
8181 if [[ -n " ${files} " ]]; then
82- make MARKDOWN_FILES=" ${files} " lint-markdown > /dev/null
82+ make MARKDOWN_FILES=" ${files} " lint-markdown > /dev/null >&2
8383 if [[ " $? " -ne 0 ]]; then
8484 echo ' ' >&2
8585 echo ' Markdown lint errors.' >&2
@@ -142,6 +142,23 @@ run_lint() {
142142 fi
143143 fi
144144
145+ # Lint Python files...
146+ files=$( echo " ${changed_files} " | grep ' \.py$' | tr ' \n' ' ' )
147+ if [[ -n " ${files} " ]]; then
148+ make check-python-linters > /dev/null >&2
149+ if [[ " $? " -ne 0 ]]; then
150+ echo ' ' >&2
151+ echo ' Unable to lint Python files. Ensure that linters are installed.' >&2
152+ else
153+ make PYTHON_FILES=" ${files} " lint-python-files > /dev/null >&2
154+ if [[ " $? " -ne 0 ]]; then
155+ echo ' ' >&2
156+ echo ' Python lint errors.' >&2
157+ return 1
158+ fi
159+ fi
160+ fi
161+
145162 # TODO: if datapackage.json, validate via schema
146163
147164 return 0
You can’t perform that action at this time.
0 commit comments