Commit Graph

7 Commits

Author SHA1 Message Date
Danny Mösch 299042a233 Allow to configure only severity in a short form for every rule with a severity (#5509)
The README states that a configuration like `attributes: error` is
valid to only set a different severity level for a rule (the
`attributes` rule here). This was previously only possible for rules
that were accompanied by a plain severity configuration.

I don't think this broke with the automatic parsing code generation.
For some rules it might have worked before, for others not. This change
makes it consistently working for all rules.
2024-03-25 21:40:56 +01:00
Danny Mösch b87467fb2c Fail with diagnostic on non-boolean macro arguments 2023-10-19 21:35:57 +02:00
Danny Mösch 3ce2d60938 Move and rename macro errors 2023-10-19 21:35:57 +02:00
Danny Mösch 58928b7e40 Enforce any on existential types (#5273)
This makes syntactically clear which types are rather expensive.
2023-10-12 08:37:23 +02:00
Danny Mösch f6e5f778fc Configure expression folding by argument of @SwiftSyntaxRule macro (#5255) 2023-10-03 07:16:33 -04:00
JP Simard 591154091e Introduce @SwiftSyntaxRule & @Fold macros (#5253)
These macros remove some of the boilerplate involved when writing rules.

This change also adds test infrastructure for the macros used within
SwiftLint.
2023-10-02 18:43:16 -04:00
Danny Mösch 2433e7b5bf Make use of macros to generate configuration parsing code (#5250) 2023-10-02 22:35:24 +02:00