Commit Graph
126 Commits
Author SHA1 Message Date
JP SimardandGitHub 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 SimardandGitHub 81474e36d0 Enforce SourceKitFreeRule contract with fatal error (#6107) 2025-06-20 07:25:01 -04:00
Danny MöschandGitHub 614c0026df Prepare for Swift 6.2 (#6115) 2025-06-20 09:25:59 +00:00
Danny Mösch 125dd161cf Support latest Swift versions 2025-06-15 19:08:16 +02:00
Martin RedingtonandGitHub f72f195ece Fix error reporting (#6061) 2025-05-21 11:34:46 +01:00
Martin RedingtonandGitHub 3ed7579fd2 Allow magic numbers to be configured (#6051) 2025-04-13 21:08:42 +01:00
Danny Mösch e3c0eebe86 Document missing parameters 2025-04-09 21:11:41 +02:00
Danny MöschandGitHub 47335d7f95 Remove tracking of correction positions (#5950)
Report number of corrections per file instead.
2025-04-05 06:04:37 -04:00
Danny MöschandGitHub 904538487c Support Swift version 6.1 (#6040) 2025-03-31 23:25:25 +02:00
Danny MöschandGitHub 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öschandGitHub 22e0f42ae1 Fix crash when disable command is preceded by unicode character (#5976) 2025-03-15 23:33:11 +01:00
Martin RedingtonandGitHub 5517d233fd Started to add rationales (#5681) 2025-03-06 10:16:30 +00:00
Danny MöschandGitHub 82fd3e4058 Ensure that content is complete using an awaitable stream (#5986) 2025-02-10 22:59:43 +01:00
Danny MöschandGitHub f796fee241 Enable strict concurrency checks in test code (#5943) 2025-01-07 22:19:25 +01:00
Danny MöschandGitHub bef8acfb0e Avoid NSRegularExpression in configurations (#5921) 2024-12-28 12:54:23 -05:00
Danny MöschandGitHub dd157e2bdf Use task-local variable (#5919) 2024-12-28 10:44:07 +01:00
Danny Mösch ec35f95786 Fix strict concurrency warnings in SwiftLintCore 2024-12-23 16:52:10 +01:00
Danny Mösch 1a54e3e313 Capture console on main actor only 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
Danny MöschandGitHub 23ba688c88 Combine compact and flat mapping (#5897) 2024-12-15 17:20:18 -05:00
Danny MöschandGitHub 172d85ab7a Add pre-defined internal Swift 6 version (#5872) 2024-11-28 18:00:44 -05:00
Danny Mösch 25f2776977 Release 0.57.1 2024-11-24 16:06:56 +01:00
Danny MöschandGitHub 2c7e7230b0 Support type casting on configuration option values defined by environment variables (#5860) 2024-11-17 15:40:39 +01:00
Martin RedingtonandGitHub 23d6a7c3f5 Added lenient command line option (#5801) 2024-10-30 22:03:54 +00:00
Martin RedingtonandGitHub 01f5ecd64a Replace description.identifier with identifier (#5837) 2024-10-26 14:46:03 +01:00
Martin RedingtonandGitHub 9ea4374145 Fix --only-rule config issues (#5773) 2024-10-25 17:19:17 +01:00
Danny MöschandGitHub 7385beaaf6 Add validation hook to configuration parsing (#5824) 2024-10-17 23:13:17 +02:00
Martin RedingtonandGitHub 9c2d0d5f86 Fix nested disable commands improved (#5797) 2024-10-15 18:56:39 +01:00
Danny MöschandGitHub 63ee1944bd Keep Swift 5 macOS build for the time being (#5816) 2024-10-01 15:25:03 +00:00
Danny MöschandGitHub b903e0bd87 Sync strict concurrency build settings (#5813) 2024-09-29 15:22:07 -04:00
Danny MöschandGitHub e9386aea51 Disallow optional configuration values (#5798)
Can be avoided now given 0d04196.
2024-09-16 21:49:15 +02:00
Danny Mösch 168fb98ed1 Release 0.57.0 2024-09-08 18:02:27 +02:00
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
Danny Mösch a24488f26e Release 0.56.2 2024-08-22 13:20:18 +02:00
Danny MöschandGitHub 9d0711070d Trigger on empty closure blocks in no_empty_block rule (#5763) 2024-08-20 22:28:30 +02:00
Danny Mösch 586dd54db4 Release 0.56.1 2024-08-07 01:09:36 +02:00
Danny Mösch 3ed1391e1d Release 0.56.0 2024-08-06 22:37:33 +02:00
Danny MöschandGitHub 88191fe58e Enable prefer_key_path rule and fix all violations (#5721) 2024-08-03 14:21:47 +02:00
wanxiangchwngandGitHub 9309f17825 Fix some typos (#5719)
Signed-off-by: wanxiangchwng <cui.shuang@foxmail.com>
2024-08-01 19:14:16 +02:00
Danny MöschandGitHub 98cf87ab8d Rename macros to something more descriptive (#5686) 2024-07-23 20:14:29 +02:00
Martin RedingtonandGitHub 3421f5f46d Enable multiline_parameters rule, and fix all cases (#5664) 2024-07-18 01:48:02 +01:00
Martin RedingtonandGitHub b1234e38a5 Add --only-rule command line option (#5666) 2024-07-15 23:52:52 +01:00
Danny MöschandGitHub cc4b569c54 Enable unused_parameter rule and fix all violations (#5673) 2024-07-14 11:20:50 -04:00
Martin RedingtonandGitHub 21b7e5ed6b Enabled prefer_self_in_static_references, and fixed all current violations (#5662) 2024-07-10 18:58:27 +01:00
Martin RedingtonandGitHub ed10aec5f8 Enable implicit_return and fix all violations (#5658) 2024-07-10 12:15:19 +01:00
Danny MöschandGitHub 714bf4c8c2 Document modified configurations used to lint examples (#5402) 2024-07-07 13:11:41 +02:00
Martin RedingtonandGitHub e0b9295412 Add update checker (#5613) 2024-07-06 19:32:36 -04:00
Koichiro UekiandGitHub aa9f474cb9 Add new no_empty_block rule (#5617) 2024-06-29 13:13:41 +02:00
Danny MöschandGitHub c810459e6a Enforce mandatory trailing comma and fix all violations (#5640) 2024-06-28 05:36:50 +00:00
Danny MöschandGitHub 09edd528dd Print only file path when reporting a correction (#5596)
Omit exact line and column information. Keep the internal logic
available for a while in case people complain for good reasons. Then
the change can be reverted easily.

Reasons behind this change:

* What is the position of a correction actually? The position where the rule triggered? The position of the transformed node?
* If there's more than a single fix, it's highly likely that all positions (except for the first) are wrong no matter what the answer to the first question is.
* Getting the positions right in a rewriter is hard. And there is always the feeling that something is wrong with them - probably because it is.
* Even if you get the positions right in a single rule: One run collects positions for all rules that apply to a file and so rewrites in other rules might draw existing positions wrong.
* We already have checks for more than one correction position disabled in tests due to these issues.
2024-06-28 07:27:24 +02:00