Commit Graph
17 Commits
Author SHA1 Message Date
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 8b2778e380 Add --config-only and --default-config options to rules command (#5199) 2023-09-02 05:41:23 -04:00
Danny Mösch 668cce84db Print YAML configuration in output of rules command 2023-08-28 20:19:28 +02:00
Danny Mösch a25fbe3e50 Make indent function a String extension 2023-07-17 23:18:26 +02:00
Danny Mösch 678cd6f805 Introduce a model for rule configuration description (#3931) 2023-07-03 22:47:30 +02:00
JP Simard 603fff9a82 Make Correction and CorrectableRule declarations public (#4937)
The CLI target shouldn't be importing SwiftLintFramework with
`@_spi(TestHelper)`. If the CLI target needs to access something in
SwiftLintFramework, that declaration should be `public`.
2023-04-26 12:17:10 -04:00
JP Simard 165172e0fa Introduce a "rule registry" concept
This will allow for registering rules that aren't compiled as part of
SwiftLintFramework.

Specifically this will allow us to split the built-in and extra rules
into separate modules, leading to faster incremental compilation when
working on rules since the rest of the framework won't need to be
rebuilt on every compilation.
2023-04-25 12:28:50 -04:00
Danny Mösch 325d0ee1e4 Consider custom attributes in attributes rule (#4616) 2023-01-31 22:34:11 +01:00
Danny Mösch 5eed8fe91b Enable if_let_shadowing rule and fix all violations (#4247) 2023-01-31 22:31:38 +01:00
Ryan AveoandJP Simard 92304cdd98 Fix building tests in Xcode (#4607)
Co-authored-by: JP Simard <jp@jpsim.com>
2022-11-30 10:33:33 -05:00
JP Simard ba8899714d Reduce visibility of custom rules (#4553) 2022-11-16 16:14:50 -05:00
JP Simard 0f9705901b Add column for SourceKit usage to rules command (#4284) 2022-10-04 18:52:03 +00:00
Vasiliy Kattouf 129a55fb74 Add ability to filter rules for generate-docs subcommand (#4195)
Added rules filtering options, like in the `rules` subcommand.

<img width="880" alt="generate-docs--help" src="https://user-images.githubusercontent.com/7829589/189372666-2f5aba62-57a1-49dc-9155-c60f9e085984.png">

To achieve reuse with `rules` subcommand:
- extracted filtering logic into `RulesFilter` (and write tests)
- extracted filtering command line parameters into `RulesFilterOptions: ParsableArguments`
2022-10-04 18:45:52 +00:00
JP Simard 4fb5ebe19b Docker: Update to Swift 5.7 & Ubuntu Jammy (#4241)
And apply workaround for https://github.com/apple/swift/issues/59961 to
all commands.
2022-09-24 15:09:41 -04:00
JP Simard 2b00164081 Remove uses of Result in CLI target (#4071)
Which will make it easier to adopt some structured concurrency features
in the future.
2022-08-08 23:04:20 -04:00
JP Simard fa55508668 Migrate from Commandant to swift-argument-parser 2020-12-14 15:51:04 -05:00
JP Simard 82b00bf4b5 Rename command files 2020-12-14 15:51:04 -05:00