Danny Mösch
e8095c748a
One working directory per test
2026-06-06 11:07:04 +02:00
Danny Mösch
ac2eda6732
Adopt Swift Testing
...
# Conflicts:
# Tests/BuiltInRulesTests/FileHeaderRuleTests.swift
# Tests/BuiltInRulesTests/FileNameNoSpaceRuleTests.swift
# Tests/BuiltInRulesTests/IndentationWidthRuleTests.swift
# Tests/CoreTests/RegexConfigurationTests.swift
# Tests/CoreTests/SwiftLintFileTests.swift
# Tests/FileSystemAccessTests/BaselineTests.swift
# Tests/FileSystemAccessTests/ConfigurationTests+Mock.swift
# Tests/FileSystemAccessTests/ConfigurationTests.swift
# Tests/FileSystemAccessTests/GlobTests.swift
# Tests/FileSystemAccessTests/MultipleConfigurationsTests.swift
# Tests/FileSystemAccessTests/ReporterTests.swift
# Tests/FileSystemAccessTests/SourceKitCrashTests.swift
# Tests/FrameworkTests/CustomRulesTests.swift
# Tests/FrameworkTests/LinterCacheTests.swift
# Tests/FrameworkTests/RuleConfigurationTests.swift
# Tests/FrameworkTests/SwiftVersionTests.swift
# Tests/GeneratedTests/GeneratedTests_02.swift
# Tests/GeneratedTests/GeneratedTests_03.swift
# Tests/GeneratedTests/GeneratedTests_04.swift
# Tests/GeneratedTests/GeneratedTests_05.swift
# Tests/GeneratedTests/GeneratedTests_06.swift
# Tests/GeneratedTests/GeneratedTests_07.swift
# Tests/GeneratedTests/GeneratedTests_08.swift
# Tests/GeneratedTests/GeneratedTests_09.swift
# Tests/GeneratedTests/GeneratedTests_10.swift
# Tests/IntegrationTests/ConfigPathResolutionTests.swift
# Tests/IntegrationTests/IntegrationTests.swift
# Tests/TestHelpers/TestHelpers.swift
2026-06-06 11:07:04 +02:00
792032480e
Support SwiftLint on Windows ( #6636 )
...
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org >
Co-authored-by: Roman Lavrov <roman.lavrov@thebrowser.company >
2026-05-27 22:02:06 +02:00
Danny Mösch
4859fa8e82
Ensure that headers matched against always end in a newline ( #6234 )
2025-09-04 23:09:35 +02:00
JP Simard
ab7d117030
Migrate FileHeaderRule from SourceKit to SwiftSyntax ( #6112 )
...
## Summary
Convert FileHeaderRule to use SwiftSyntax instead of SourceKit for
improved performance and better handling of file header comments,
shebangs, and doc comments.
## Key Technical Improvements
- **Enhanced shebang support** properly skipping past `#!/usr/bin/env swift` lines
- **Better comment type discrimination** excluding doc comments from header analysis
- **Accurate position calculation** converting between UTF-8 and UTF-16 offsets for regex matching
- **Improved trivia traversal** for comprehensive header comment collection
- **SwiftLint command filtering** to exclude directive comments from header content
## Migration Details
- Replaced `OptInRule` with `@SwiftSyntaxRule(optIn: true)` annotation
- Implemented `ViolationsSyntaxVisitor` pattern for file-level analysis
- Added logic to start header collection after shebang.endPosition if present
- Distinguished between regular comments and doc comments (///, /** */)
- Maintained UTF-16 offset calculations for NSRegularExpression compatibility
- Added `skipDisableCommandTests: true` for SwiftSyntax disable command behavior
- Removed unnecessary SourceKittenFramework import
2025-06-24 09:48:25 -04:00
JP Simard
81474e36d0
Enforce SourceKitFreeRule contract with fatal error ( #6107 )
2025-06-20 07:25:01 -04:00
Danny Mösch
15b285527a
Separate built-in rule tests from framework tests ( #5924 )
...
* Short names for test modules
* Lint plugins and `Package.swift` in integration tests
* Simplify and merge file groups in Bazel
* Move common functions to `TestHelpers`
2024-12-30 12:26:46 +01:00