Skip to content
Snippets Groups Projects
Commit a7dd1fba authored by Roang's avatar Roang
Browse files

Add djLint configuration

parent 47572bd1
Branches
Tags
No related merge requests found
......@@ -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
```
......
......@@ -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"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment