Skip to content

Commit

Permalink
Add curlylint support
Browse files Browse the repository at this point in the history
  • Loading branch information
cpina committed Sep 23, 2020
1 parent b3f5ea8 commit 56981e1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
pip3 install coveralls
- name: curlylint
run: |
tools/curlylint.sh
- name: Test with pytest
run: |
source tools/environment-variables-for-test.sh
Expand Down
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
asgiref==3.2.10
attrs==20.2.0
click==7.1.2
curlylint==0.12.0
Django==3.1.1
django-crispy-forms==1.9.2
gunicorn==20.0.4
Jinja2==2.11.2
MarkupSafe==1.1.1
mysqlclient==2.0.1
parsy==1.1.0
pathspec==0.8.0
python-dotenv==0.14.0
pytz==2020.1
sqlparse==0.3.1
toml==0.10.1
15 changes: 15 additions & 0 deletions tools/curlylint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# --rule 'indent: "tab"' Disabled, doesn't apply

curlylint --include '\.tmpl' \
--rule 'html_has_lang: "en"' \
--rule 'aria_role: true' \
--rule 'django_forms_rendering: true' \
--rule 'image_alt: true' \
--rule 'meta_viewport: true' \
--rule 'no_autofocus: true' \
--rule 'tabindex_no_positive: true' \
SchemaCollaboration/core/templates \
SchemaCollaboration/management/templates \
SchemaCollaboration/comments/templates \

0 comments on commit 56981e1

Please sign in to comment.