Skip to content

Commit

Permalink
Make stickler and pre-commit hook share flake8 config
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyroberts committed Mar 20, 2020
1 parent 2545546 commit 22cf69b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 115
ignore = E128, E265, F403, W503, W1618 # http://pep8.readthedocs.org/en/latest/intro.html#error-codes
3 changes: 1 addition & 2 deletions .stickler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ files:
linters:
flake8:
python: 3
max-line-length: 115
ignore: E128,E265,F403,W503,W1618 # http://pep8.readthedocs.org/en/latest/intro.html#error-codes
config: .flake8
eslint:
config: ./.eslintrc.js
install_plugins: true
2 changes: 1 addition & 1 deletion git-hooks/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fi
status=0
git diff-index --check --cached $against --
if [ $? != 0 ]; then status=1; fi
git diff --cached | flake8 --diff --show-source --max-line-length=115
git diff --cached | flake8 --diff --show-source --config=.flake8
if [ $? != 0 ]; then status=1; fi

# connect stdin to keyboard so user can interact
Expand Down

0 comments on commit 22cf69b

Please sign in to comment.