Feature
- New
--allow-empty-inputoption, and the matchingallow_empty_inputconfig key, exits0instead of2when the given paths match no files.
Fix
- An html close tag inside an inline
{% if %}...{% endif %}no longer dedents everything that follows it by one level, collapsing nested structures toward column 0 - a regression in 1.43.0. A close tag already at the content level of the template block it sits in is held there, but the level it was denied was then taken off the end of the line instead, so{% if r %}</strong>{% endif %}moved the rest of the block left. The matching open tag never took a level to give back, since{% endif %}had already returned it. - A run where every file found was skipped by
exclude,extend_exclude,use_gitignoreorrequire_pragmanow exits0instead of1. Skipping them is the configuration doing its job, and it is what letsexcludework under pre-commit, which passes the names of every staged file. Paths that match no files at all now exit2rather than1, so exit1means only that djLint found something to report. - An unhandled error exits
2instead of1, so a crash is no longer indistinguishable from a lint error. The traceback is still printed. - An unrecognized
--profile, orprofilein a config file, is now a usage error. A typo used to lint with a silently different rule set and exit0, and raisedKeyErrorwith--require-pragma. - A directory whose name matches the file extension (
build.html/) is no longer picked up as a template and opened as a file, crashing the run. No files to check!is written to stderr instead of stdout, where formatted code is written.- Input piped to
djlint - --reformatthat--require-pragmaskips is handed back byte for byte instead of being replaced byNo files to check!.