A new linter class, Formulas, has been added to check for issues in definition files, particularly with default parameters overrides. It has been integrated into the Linter factory to also check '.inst.cfg' and '.def.json' files for formulas-related issues. Additionally, a new 'diagnostic-incorrect-formula' check has been included in the .printer-linter configuration.
CURA-10901
This update adds a new check for deleted files in the printer linter. This will alert the user when a file has been deleted that could potentially disrupt upgrade scripts. An argument "--deleted" is also added to terminal.py to facilitate this new check. Additionally, the printer-linter version has been incremented to 0.1.2.
CURA-10903
A new Linter subclass - 'Directory' has been created and integrated into the linting process to handle directory naming conventions, specifically for MacOS. MacOS has issues when signing and notarizing directories with '.' in their names. The new class will trigger an 'Error' level diagnostic if this convention is violated. The linter will become a required check with this update, as its new check configuration was added to '.printer-linter'. The version number in 'pyproject.toml' was also incremented to reflect these changes.
Contributes to CURA-11014
printer-linter works of definitions, profiles and meshes;
It has various diagnostic checks. With possible suggestions for fixes.
It should also be able to fix certain diagnostic issues and it can be used
to format the files according to code-style.
It can output the diagnostics in a yaml file, which can then be used to comment
on PR's with suggestions to the author. Future PR.
The settings for the diagnostics and checks are defined in `.printer-linter`
and are very self explanatory.
```
checks:
diagnostic-mesh-file-extension: true
diagnostic-mesh-file-size: true
diagnostic-definition-redundant-override: true
fixes:
diagnostic-definition-redundant-override: true
format:
format-definition-bracket-newline: false
format-definition-paired-coordinate-array: true
format-definition-sort-keys: true
format-definition-indent: 4
format-profile-space-around-delimiters: true
format-profile-sort-keys: true
diagnostic-mesh-file-size: 1200000
```