16 Commits

Author SHA1 Message Date
Remco Burema
c9e23dab83 Disable 'temp should be defined in material' warning for now.
relates to CURA-11999
2024-07-02 13:17:21 +02:00
Erwan MATHIEU
35a5abc66d Add check for experimental settings
CURA-10899
2024-06-17 16:02:36 +02:00
Saumya Jain
284f8e2d6d
Merge branch 'main' into CURA-10901-warn-if-formulas-are-NOK 2024-04-26 12:08:12 +02:00
Saumya Jain
ceb5e7096e Add new linter for long profile names
CURA-11153
2024-04-24 10:32:29 +02:00
Saumya Jain
8449d6d953
Merge branch 'main' into CURA-10901-warn-if-formulas-are-NOK 2024-04-10 15:03:53 +02:00
Saumya Jain
702f8573c3
Merge branch 'main' into CURA-10903-warn-for-deleted-files 2024-04-08 14:03:48 +02:00
Saumya Jain
388be81116
Merge branch 'main' into CURA-10901-warn-if-formulas-are-NOK 2024-04-08 14:02:00 +02:00
Saumya Jain
fe0120ef64 Add Formulas linter and integrate with factory
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
2024-04-05 18:18:40 +02:00
Saumya Jain
38382eeec7 Add detection for deleted files in printer linter
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
2024-04-05 15:55:30 +02:00
Saumya Jain
e5fb40b48c Add material temperature check in linter
CURA-10904
2024-04-05 10:02:08 +02:00
jellespijker
b401ecee02 Add MacOS directory naming linting
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
2023-09-22 01:29:22 +02:00
jspijker
ab86a85c77 Ignore redundant-override in the machine_* types 2023-01-10 11:02:08 +01:00
Joey de l'Arago
ad7e719146 Format lists and dicts of a single item onto one line
example:
"dict":
{
 "value": 10
}
becomes
"dict": { "value": 10 }
2022-11-22 21:42:42 +01:00
jspijker
187dfe1210 single-value-single-line formatting
Need to figure out the regex expression.
To only select overrides consisting of a
single value
2022-11-21 14:20:53 +01:00
jspijker
a4615fd729 Update default setting values 2022-11-19 20:31:28 +01:00
jspijker
104bc585f4 Added a linting tool for Cura Printers and Profiles
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
```
2022-11-19 19:07:32 +01:00