Self hosted FLOSS fitness/workout, nutrition and weight tracker
Add isort check
Peter van der Doesd3a33c310090
diff --git a/gulpfile.js b/gulpfile.jsindex e1b6eafdf..bf082f8a5 100644--- a/gulpfile.js+++ b/gulpfile.js@@ -1,6 +1,16 @@const gulp = require('gulp');const eslint = require('gulp-eslint');const flake8 = require('@petervanderdoes/gulp-flake8');+const isort = require('@petervanderdoes/gulp-isort');++const pythonfiles = ['**/*py',+ '!**/extras/**',+ '!**/build/**',+ '!**/dist/**',+ '!**/node_modules/**',+ '!**/migrations/**',+ '!**/docs/**',+ '!settings.py'];gulp.task('lint-js', function () {// ESLint ignores files with "node_modules" paths.@@ -20,19 +30,19 @@ gulp.task('lint-js', function () {});gulp.task('lint-flake8', function () {- return gulp.src(['**/*py',- '!**/extras/**',- '!**/build/**',- '!**/dist/**',- '!**/node_modules/**',- '!**/migrations/**',- '!**/docs/**',- '!settings.py'])+ return gulp.src(pythonfiles).pipe(flake8()).pipe(flake8.reporter()).pipe(flake8.failOnError());});+gulp.task('lint-isort', function () {+ return gulp.src(pythonfiles)+ .pipe(isort())+ .pipe(isort.reporter())+ .pipe(isort.failAfterError());+});+gulp.task('lint', ['lint-js', 'lint-flake8']);// gulp.task('lint', ['lint-js', 'lint-python']);diff --git a/requirements_devel.txt b/requirements_devel.txtindex 42b44d087..cb9ae31ce 100644--- a/requirements_devel.txt+++ b/requirements_devel.txt@@ -11,3 +11,4 @@ django-debug-toolbarflake8-puttytblibtransifex-client+isort