Feature
- djLint warns about settings that would not do what they look like, so a typo no longer goes unnoticed. The warnings go to stderr once per run, as the others do:
- a name in a configuration file that is not a djLint setting, with the closest one it knows, as
max_line_lengthformax_line_lenghtormax-line-length; - a rule code in
ignore,includeorper-file-ignoresthat no rule has, with the right case forh006; a code in bothignoreandinclude, which stays off; and a code inincludethat the profile never runs, such as T028 underdjango; --indent-cssor thecsssettings withoutformat_css, the same for JavaScript, andformat_attribute_js_json_patternorformat_attribute_js_json_min_propswithoutformat_attribute_js_json.
- a name in a configuration file that is not a djLint setting, with the closest one it knows, as
- The language server shows these warnings in the editor, each once until the configuration changes, and so does a setting the editor sends that djLint doesn't know, with the closest one it does. The editor's ones used to go only to the server's log.
djlint.api.load_configtakeson_warning, a function that gets every warning about the settings, for a program that shows them itself. Without it, they go to stderr once per process, as before.- A switch in a configuration file can also be written as the words configparser takes, in any case:
"yes","on","true"or"1"for on,"no","off","false"or"0"for off, and the numbers 1 and 0.
Bug fixes
- The text
"false"in a configuration file turns a switch off. Any text used to turn it on, so"format_css": "false"formatted CSS. A value that is no switch, such as"maybe", is now an error naming the file, as a number setting that is no number already was. - A number setting written as
trueor with a fraction, such asindent = trueormax_line_length = 100.5, is an error. They used to become 1 and 100. A whole number written with a fraction part,100.0, still counts. - A
linter_output_formatnaming a field djLint doesn't have, such as{lin}, is reported when the run starts, with the fields it can name. The run used to fail at the first finding. per-file-ignorestakes a list of codes for a pattern, as the other options with several values do, such as"base.html" = ["H030", "H025"]. A list used to make linting fail.