JP Simard
d22e7335ab
Add SwiftSyntaxKindBridge to help migrate custom rules to SwiftSyntax ( #6126 )
...
This provides an alternative to getting syntax kinds from SourceKit. The
mappings aren't 100% equivalent, but this should serve as a useful
compatibility layer.
2025-06-21 15:27:21 -04:00
JP Simard
5a2cf4b1fe
Remove dead code ( #6125 )
...
In particular lots of stuff that used to be needed with SourceKit that
we no longer need to keep around.
Identified using Periphery: https://github.com/peripheryapp/periphery
2025-06-21 15:19:37 -04:00
JP Simard
81474e36d0
Enforce SourceKitFreeRule contract with fatal error ( #6107 )
2025-06-20 07:25:01 -04:00
Danny Mösch
2578cb3862
Use SwiftSyntax version 601.0.0 ( #6003 )
2025-04-03 21:27:57 +02:00
Danny Mösch
043f9cac5b
Introduce internal CLI to simplify development tasks ( #6032 )
...
Start with a command that generates a template for a new SwiftSyntax
rule. This tool could remain separate or be merged into the official
binary under a `dev` sub-command at a later point in time.
2025-03-23 01:21:41 +01:00
Danny Mösch
b14272d4f2
Rewrite type_contents_order rule with SwiftSyntax ( #6002 )
2025-03-17 20:15:02 +01:00
Danny Mösch
22e0f42ae1
Fix crash when disable command is preceded by unicode character ( #5976 )
2025-03-15 23:33:11 +01:00
Keith Bauer
4eb19bef17
Parallelize file grouping ( #5983 )
2025-02-01 07:10:44 -05:00
Danny Mösch
fcdc98a52d
Revert "Improve performance of excluded files filter" ( #5962 )
...
This reverts commit 152355e36f from #5157 .
# Conflicts:
# tools/oss-check
2025-01-15 19:15:44 +01:00
Danny Mösch
a5c9319e13
Fix warnings in Linux build ( #5940 )
2025-01-06 18:28:20 +01:00
Danny Mösch
bef8acfb0e
Avoid NSRegularExpression in configurations ( #5921 )
2024-12-28 12:54:23 -05:00
Danny Mösch
152355e36f
Improve performance of excluded files filter ( #5157 )
...
The current algorithm is like "collect all included files and subtract all excluded files".
Collecting all included and all excluded files relies on the file system. This can become slow
when the patterns used to exclude files resolve to a large number of files.
The new approach only collects all lintable files and checks them against the exclude patterns.
This can be done by in-memory string-regex-match and does therefore not require file system accesses.
2024-12-25 17:33:33 -05:00
Danny Mösch
ec35f95786
Fix strict concurrency warnings in SwiftLintCore
2024-12-23 16:52:10 +01:00
Danny Mösch
a6c4fd98bc
Move files from SwiftLintCore to SwiftLintFramework
...
Ideally, SwiftLintCore would some day only contain components
that are needed to define rules. Consequently, it would be the
only bundle required to import for (external) rule development.
2024-12-23 12:51:43 +01:00
Dinesh Sharma and Danny Mösch
8e3b50fa61
Add new category for @IBSegueAction to type_contents_order rule ( #5524 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2024-12-14 18:02:54 -05:00
Martin Redington
23d6a7c3f5
Added lenient command line option ( #5801 )
2024-10-30 22:03:54 +00:00
Martin Redington
01f5ecd64a
Replace description.identifier with identifier ( #5837 )
2024-10-26 14:46:03 +01:00
Martin Redington
9ea4374145
Fix --only-rule config issues ( #5773 )
2024-10-25 17:19:17 +01:00
timesince
5070b8257c
Remove unnecessary symbol ( #5827 )
2024-10-17 22:34:19 +02:00
Danny Mösch
c4a732583a
Wrap buffer to make it @Sendable ( #5815 )
2024-09-30 14:35:34 +02:00
Martin Redington and Danny Mösch
06e4e3cc07
Fix superfluous_disable_command for custom_rules ( #5670 )
...
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2024-09-07 23:15:21 +02:00
Sam Rayner
48aaca61f0
Reverse Data -> String conversion rule ( #5601 )
2024-08-24 10:13:04 +00:00
Danny Mösch
9d0711070d
Trigger on empty closure blocks in no_empty_block rule ( #5763 )
2024-08-20 22:28:30 +02:00
Danny Mösch
88191fe58e
Enable prefer_key_path rule and fix all violations ( #5721 )
2024-08-03 14:21:47 +02:00
wanxiangchwng
9309f17825
Fix some typos ( #5719 )
...
Signed-off-by: wanxiangchwng <cui.shuang@foxmail.com >
2024-08-01 19:14:16 +02:00
Danny Mösch
4b9c15969d
Remove unused conformance ( #5704 )
2024-07-25 16:43:57 -04:00
Martin Redington
3421f5f46d
Enable multiline_parameters rule, and fix all cases ( #5664 )
2024-07-18 01:48:02 +01:00
Martin Redington
b1234e38a5
Add --only-rule command line option ( #5666 )
2024-07-15 23:52:52 +01:00
Danny Mösch
cc4b569c54
Enable unused_parameter rule and fix all violations ( #5673 )
2024-07-14 11:20:50 -04:00
Martin Redington
21b7e5ed6b
Enabled prefer_self_in_static_references, and fixed all current violations ( #5662 )
2024-07-10 18:58:27 +01:00
Martin Redington
ed10aec5f8
Enable implicit_return and fix all violations ( #5658 )
2024-07-10 12:15:19 +01:00
Danny Mösch
714bf4c8c2
Document modified configurations used to lint examples ( #5402 )
2024-07-07 13:11:41 +02:00
Martin Redington
e0b9295412
Add update checker ( #5613 )
2024-07-06 19:32:36 -04:00
Danny Mösch
c810459e6a
Enforce mandatory trailing comma and fix all violations ( #5640 )
2024-06-28 05:36:50 +00:00
Martin Redington and Danny Mösch
8bed208416
Adds baseline and write_baseline config file options ( #5552 )
...
* Adds `baseline` and `write_baseline` config file options, so baseline can be used by people who can't pass command line arguments (e.g. plugin users).
* Added PR number
* Fixed change log entry
* Update Source/swiftlint/Helpers/LintOrAnalyzeCommand.swift
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
* updated
---------
Co-authored-by: Danny Mösch <danny.moesch@icloud.com >
2024-06-27 18:40:04 +01:00
Danny Mösch
914fa02e4e
Use SwiftSyntax version 600.0.0-prerelease-2024-03-11 ( #5527 )
...
We can also switch back to an exact SwiftSyntax version now with the
plugins in a separate repository. In fact, using the plugin, no direct
dependency to SwiftSyntax is required whatsoever.
2024-06-22 11:14:14 +02:00
Danny Mösch
72069bf5c0
Ignore ACL restricted to value setting in extension_access_modifier rule ( #5625 )
2024-06-22 10:34:10 +02:00
Danny Mösch
dfe19ac7fc
Respect comments before opening braces in opening_brace rule ( #5582 )
2024-05-15 23:06:59 +02:00
Danny Mösch
5f8fe00bf9
Pass an entity's parent to the traversal block as well
2024-05-03 22:26:21 +02:00
Danny Mösch
11cbac63d1
Enable consider_default_literal_types_redundant option ( #5555 )
2024-05-01 19:58:42 +00:00
Martin Redington
7623f1e730
Enable more rules in SwiftLint's own .swiftlint.yml ( #5532 )
2024-04-27 18:43:08 +02:00
Martin Redington
8fdf669d53
Add all analyzer pseudo-rule ( #5519 )
2024-04-02 09:34:17 +02:00
Martin Redington
5075cc073c
Fix warnings about configured rules that are not enabled, when they are enabled in a parent config ( #4864 )
2024-03-25 21:39:22 +01:00
Oleg Kohtenko
bedf211c43
Ignore absence of child or parent config instead of falling back to default ( #5407 )
2024-03-16 10:29:42 -04:00
Danny Mösch
c730047176
Enable superfluous_else rule ( #5412 )
2024-03-03 16:30:44 +01:00
Danny Mösch
d0fb75fcfb
Prefer package ACL over @_spi ( #5466 )
2024-03-03 16:30:04 +01:00
Danny Mösch
8b98d859a3
Make superfluous_else rule auto-correctable ( #5411 )
2024-01-07 18:55:42 +01:00
Ben P
544e1c60c7
Add a new non_optional_string_data_conversion rule ( #5264 )
2023-12-02 07:33:22 -05:00
Kishikawa Katsumi
0d54c2a10d
Rewrite opening_brace rule with SwiftSyntax ( #5164 )
2023-12-02 12:21:50 +01:00
Danny Mösch
8cb2cf9f85
Rewrite let_var_whitespace rule with SwiftSyntax ( #5367 )
2023-11-29 22:45:06 +01:00