Bug fixes
- With Click 8.5.1 or newer,
djlint --helpno longer lists a blankSRC ...row under "Other". The files to check are still shown in the usage line. - A template that is not valid UTF-8, or that djLint isn't allowed to read or write, no longer aborts the run with a traceback and a request to report a bug. djLint names the file and the reason, checks the rest and still exits
2, because that file went unchecked.--github-outputadds an error annotation on the file, and--sarifreports it as a notification on a run marked as not successful. - A configuration file djLint can't read, such as a
pyproject.toml,djlint.tomlor.djlintrcwith a syntax error or a file named by--configuration, is now a usage error that exits2. djLint used to print a red line and check the templates against its defaults, so the run could pass. The same goes for a number setting with a value that isn't a number, such asmax_line_length = "wide", and for a.djlint_rules.yamlthat isn't valid YAML or doesn't hold a list of rules, which crashed with a traceback. An empty.djlint_rules.yamlno longer crashes. In the Python API,load_configraisesclick.UsageErrorfor these. - Ctrl+C exits
130, as shells report an interrupted command, rather than1, which means djLint found something. The same goes fordjlint --lsp.