kopia lustrzana https://github.com/wagtail/wagtail
Switch from jinjalint to curlylint
rodzic
855486157b
commit
fc0f76ea9d
|
@ -22,13 +22,8 @@ jobs:
|
|||
- run: pipenv run flake8
|
||||
- run: pipenv run isort --check-only --diff .
|
||||
- run: pipenv run black --target-version py37 --check --diff .
|
||||
# Filter out known false positives, while preserving normal output and error codes.
|
||||
# See https://github.com/motet-a/jinjalint/issues/18.
|
||||
# And https://circleci.com/docs/2.0/configuration-reference/#default-shell-options.
|
||||
- run: git ls-files '*.html' | xargs pipenv run djhtml --check
|
||||
- run:
|
||||
shell: /bin/bash -e
|
||||
command: pipenv run jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:76' | tee /dev/tty | wc -l | grep -q '0'
|
||||
- run: pipenv run curlylint --parse-only wagtail
|
||||
- run: pipenv run doc8 docs
|
||||
- run: DATABASE_NAME=wagtail.db pipenv run python -u runtests.py
|
||||
|
||||
|
|
4
Makefile
4
Makefile
|
@ -20,9 +20,7 @@ lint:
|
|||
black --target-version py37 --check --diff .
|
||||
flake8
|
||||
isort --check-only --diff .
|
||||
# Filter out known false positives, while preserving normal output and error codes.
|
||||
# See https://github.com/motet-a/jinjalint/issues/18.
|
||||
jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:76' | tee /dev/tty | wc -l | grep -q '0'
|
||||
curlylint --parse-only wagtail
|
||||
git ls-files '*.html' | xargs djhtml --check
|
||||
npm run lint:css --silent
|
||||
npm run lint:js --silent
|
||||
|
|
|
@ -6,7 +6,7 @@ We use `Django templates <https://docs.djangoproject.com/en/stable/ref/templates
|
|||
Linting HTML
|
||||
~~~~~~~~~~~~
|
||||
|
||||
We use `jinjalint <https://github.com/motet-a/jinjalint>`_ to lint templates and `djhtml <https://github.com/rtts/djhtml>`_ to format them.
|
||||
We use `curlylint <https://www.curlylint.org/>`_ to lint templates and `djhtml <https://github.com/rtts/djhtml>`_ to format them.
|
||||
If you have installed Wagtail's testing dependencies (``pip install -e .[testing]``), you can check your code by running ``make lint``, and format your code by running ``make format``.
|
||||
|
||||
Principles
|
||||
|
|
2
setup.py
2
setup.py
|
@ -63,7 +63,7 @@ testing_extras = [
|
|||
"doc8==0.8.1",
|
||||
"flake8-assertive==2.0.0",
|
||||
# For templates linting
|
||||
"jinjalint>=0.5",
|
||||
"curlylint==0.13.0",
|
||||
# For template indenting
|
||||
"djhtml==1.4.13",
|
||||
# for validating string formats in .po translation files
|
||||
|
|
Ładowanie…
Reference in New Issue