From 44076e34f42d0181339a1b06b6080d7136e66bf7 Mon Sep 17 00:00:00 2001 From: Max Meinhold Date: Sun, 17 May 2020 00:43:22 -0400 Subject: [PATCH 1/4] Add pylint_quotes and pylint/routes to readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df1e2f25..06d4e1a4 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ fail blocking you from merging. To make your life easier just run it before maki To run pylint use this command: ```bash -pylint packet +pylint --load-plugins pylint_quotes packet/routes packet ``` All python files should have a top-level docstring explaining the contents of the file and complex functions should From 2b92c8eb70006919028773a303047877abda0396 Mon Sep 17 00:00:00 2001 From: Max Meinhold Date: Sun, 17 May 2020 12:09:09 -0400 Subject: [PATCH 2/4] Update pylint task in gulp --- gulpfile.js/tasks/pylint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js/tasks/pylint.js b/gulpfile.js/tasks/pylint.js index 6a82ab5d..2e93f752 100644 --- a/gulpfile.js/tasks/pylint.js +++ b/gulpfile.js/tasks/pylint.js @@ -2,7 +2,7 @@ const gulp = require('gulp'); const exec = require('child_process').exec; let pylintTask = (cb) => { - exec('pylint packet', function (err, stdout, stderr) { + exec('pylint --load-plugins pylint_quotes packet/routes packet', function (err, stdout, stderr) { console.log(stdout); console.log(stderr); cb(err); From 31a6ad1fd4943d065e383fa56744420c9d795d52 Mon Sep 17 00:00:00 2001 From: Max Meinhold Date: Sun, 17 May 2020 12:13:20 -0400 Subject: [PATCH 3/4] Add docker build to travis Require that the image build succeeds in order to pass ci --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6d2ad6fa..e77247ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,11 @@ language: python python: - "3.7" +services: + - "docker" install: - "pip install -r requirements.txt" script: - "pylint --load-plugins pylint_quotes packet/routes packet" + - "docker build -t packet ." From 0fa696a54b94f8272a33364fe2bfc00f56f78183 Mon Sep 17 00:00:00 2001 From: Max Meinhold Date: Sun, 17 May 2020 12:57:51 -0400 Subject: [PATCH 4/4] Move pylint to grunt lint task Prevents linting failures from failing builds --- .travis.yml | 7 ++++++- gulpfile.js/index.js | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e77247ae..d0cbb081 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,11 @@ services: install: - "pip install -r requirements.txt" + - "curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash" + - "nvm install" + - "nvm use" + - "npm install -g gulp" + - "npm install" script: - - "pylint --load-plugins pylint_quotes packet/routes packet" + - "gulp lint" - "docker build -t packet ." diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index 81238034..d191d579 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -19,4 +19,5 @@ requireDir('./tasks', {recurse: true}); // Default task gulp.task('default', gulp.parallel('css', 'js')); -gulp.task('production', gulp.parallel('css', 'js', 'generate-favicon', 'pylint')); +gulp.task('production', gulp.parallel('css', 'js', 'generate-favicon')); +gulp.task('lint', gulp.parallel('pylint'));