[Lint] Exclude js and css from EOF fixer

- When running pre-commit on all files it is picking up minified js and
  css files. Since prettier will format correctly the source files ignore
  them in end-of-file fixer.
- The template files in web docs can be ignored too.
- Removed the unneeded `pre-commit-hooks` dependency as pre-commit
  resolves that itself.
- Include files fixed by pre-commit.
This commit is contained in:
Calum Lind 2018-10-05 15:24:36 +01:00
parent 6cf13d112b
commit a8a4fb69c0
14 changed files with 13 additions and 16 deletions

View File

@ -1,3 +1,7 @@
exclude: >
(?x)^(
deluge/ui/web/docs/template/.*|
)$
repos:
- repo: https://github.com/ambv/black
rev: 18.9b0
@ -29,6 +33,7 @@ repos:
name: Fix Double-quotes
- id: end-of-file-fixer
name: Fix End-of-files
exclude_types: [javascript, css]
- id: mixed-line-ending
name: Fix Line-endings
args: [--fix=auto]

View File

@ -9,7 +9,3 @@
*no client-side validation (could be solved by a ui.aclient exception-plugin)
*expand/arrows in sidebar are disabled to save space, fix the space issue or implement an alternative
*fix and move tracker_host column+status-field to core.

View File

@ -60,4 +60,3 @@
module="T/Twisted/Twisted-12.3.0.tar.bz2"/>
</distutils>
</moduleset>

View File

@ -47,4 +47,3 @@ find $LIBDIR/python/deluge-*.egg -name "*.py" -exec rm -f {} \; # Remove source
rm -fr $LIBDIR/pygtk/2.0/*demo*
echo "*** Packaging done:`du -hs $APPDIR | cut -f 1`"

View File

@ -6,7 +6,6 @@ tox
tox-venv
detox
pre-commit
pre-commit-hooks
flake8-blind-except
flake8-builtins
flake8-commas

View File

@ -549,7 +549,6 @@ tests_require = [
'flake8-mutable',
'flake8-quotes',
'pre-commit',
'pre-commit-hooks',
'pytest',
'detox',
'tox',