Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thomasDOTwtf
hub
Commits
a7dd1fba
Commit
a7dd1fba
authored
8 months ago
by
Roang
Browse files
Options
Downloads
Patches
Plain Diff
Add djLint configuration
parent
47572bd1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Development.md
+10
-0
10 additions, 0 deletions
Development.md
pyproject.toml
+6
-0
6 additions, 0 deletions
pyproject.toml
with
16 additions
and
0 deletions
Development.md
+
10
−
0
View file @
a7dd1fba
...
...
@@ -221,6 +221,16 @@ Dieses hat die folgenden Kommandos:
-
`ruff check`
: Diess Kommando checkt auf häufige Fehler in python code und hat auch teilweise Möglichkeiten diese zu beheben
-
`ruff format`
: Dieses Kommando re-formatiert alle python dateien nach einem voregebenen Code-Style
### djLink
**Leider ist es nicht möglich djLint so zu konfigurieren, dass es automatisch die richtigen Profile verwendet.**
**Wenn eine Integration in einen Editor gewünscht ist, muss dies berücksichtigt werden!**
Manuell kann es folgendermaßen ausgeführt werden:
-
`djlint --profile django --extension html --reformat .`
um alle .html Dateien zu formatieren
-
`djlint --profile jinja --extension j2 --reformat .`
um alle .j2 Dateien zu formatieren
-
`djlint --lint .`
um alle ein potenzielle Fehler per Linting zu finden
## Häufige Fehler
```
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
6
−
0
View file @
a7dd1fba
...
...
@@ -111,6 +111,12 @@ output = ".tools/coverage/coverage.xml"
[
tool.coverage.html
]
directory
=
".tools/coverage/html_report"
[
tool.djlint
]
indent
=
2
ignore
=
"H006,H013,H021,H022,H030,H031"
linter_output_format
=
"{filename}:{line}: {code} {message} {match}"
preserve_blank_lines
=
true
extend_exclude
=
".tools"
[
tool.mypy
]
plugins
=[
"mypy_django_plugin.main"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment