Commit Graph

29 Commits

Author SHA1 Message Date
Marcelo Fabri 772e5f5806
Delegate Location init for AbsolutePosition to existing one (#4162) 2022-09-05 01:47:25 -04:00
Marcelo Fabri 79347a1728
Rewrite ForceUnwrappingRule using SwiftSyntax (#4155) 2022-09-04 02:08:26 -07:00
JP Simard 4119c27857
Fix typo 2022-08-29 00:33:51 -04:00
JP Simard 3037946bbc
Migrate ClosureSpacingRule to SwiftSyntax (#4092)
Fixes #4090. Continued from #4091.
2022-08-15 18:27:43 +00:00
JP Simard fe5baca7cd
Migrate to use SourceKitten's new ByteCount/ByteRange types (#3037)
New APIs were introduced in SourceKitten to allow for a more typesafe distinction between integers meaning NSString-based distances and byte-based distances.

* https://github.com/jpsim/SourceKitten/pull/639
* https://github.com/jpsim/SourceKitten/pull/642

This PR migrates SwiftLint's use of those APIs.
2020-01-16 15:18:37 -08:00
JP Simard 37167a8a35
Add documentation comments to all public declarations (#3027) 2020-01-08 09:47:10 -08:00
JP Simard 40ade98710
Update SourceKitten to 0.28.0 (#3011) 2020-01-03 16:47:18 -08:00
Paul Taykalo ac40778cb3 Use SwiftLintFile wrapper over the File 2019-11-07 15:19:17 +02:00
JP Simard 3a0c2b0c05
Migrate LinterCache to use Codable models (#2799)
* Migrate LinterCache to use Codable models

improving performance and type safety

* Fix Linux

* Avoid creating a Decoder if it won't be used

For example if the file doesn't exist or can't be read.

* Use corelibs plist coder if available

It's available in the Swift 5.1 branch: https://github.com/apple/swift-corelibs-foundation/pull/1849

* Remove unused error case
2019-07-07 00:35:10 -07:00
JP Simard a944808c8b
Default column to 1 in XcodeReporter output (#2488) 2018-11-27 13:00:01 -08:00
Marcelo Fabri fb9d8df8a3 Add back MARK 2018-11-20 10:32:20 -08:00
Marcelo Fabri cf0c7b7b21 Use default Equatable and Hashable implementations 2018-11-19 09:51:12 -08:00
Marcelo Fabri 1f121b1ef7 Enable static_operator opt-in rule in SwiftLint 2018-09-16 20:33:28 -07:00
JP Simard b83e0991b9
Remove all file headers
The MIT license doesn't require that all files be prepended with this
licensing or copyright information. Realm confirmed that they're ok with this
change. This will enable some companies to contribute to SwiftLint and the
date & authorship information will remain accessible via git source control.
2018-05-04 13:42:02 -07:00
Marcelo Fabri 03b4d6b020 Fix violations introduced when linting with Swift 4.1
Part of #2021
2018-02-03 22:23:48 -08:00
JP Simard 8c9cba0c0f
fallback to line 1 when no line is provided & reporting with `xcode`
this is a generalization of the fix from #1521
2017-05-17 14:56:46 -07:00
JP Simard c5c2e21120
update SwiftLintFramework/Models to follow Swift 3 API Design Guidelines 2017-01-09 19:05:29 -08:00
JP Simard 8858b3c484 sort imports in Location.swift 2016-12-21 13:26:55 -08:00
Jamie Edge 9c8939a9db Resolve build issue by including missing import. Resolve line length violation. 2016-12-21 12:02:59 +00:00
Jamie Edge b9afeba7fd Switch to a relative path within the HTML report output. 2016-12-21 11:56:33 +00:00
JP Simard 0faf567931
use bridge() rather than explict or implicit casts
this is a step in aligning the code to compile on both Darwin and
Linux
2016-12-11 13:47:44 -08:00
Marcelo Fabri 13b0cfe623 Fixing inconsistencies 2016-12-08 18:29:57 -02:00
JP Simard 39e1001629
make lots of Swift 3 related changes
many of which are to help with otherwise very long compile times
2016-12-01 00:34:29 -08:00
Norio Nomura 3ff76e7ce8
Update SourceKitten 2016-11-04 20:24:21 +09:00
Norio Nomura 8bf15f1dba
Migrate to Swift 3.0 2016-10-09 01:09:50 +09:00
JP Simard 9acc4c56b3 rewrite Location.description to compile 25x faster
before: 1097.1ms
after: 44.2ms
2016-01-18 13:52:37 -08:00
JP Simard 8d529f1804 Fix multibyte handling in many rules 2015-12-24 20:59:15 -05:00
crimsonwoods 4806e31f23 Rename `lineAndCharacterForByteOffset` to `lineAndCharacterForCharacterOffset`.
According to a change 247f02eff4,
method name should be changed.
2015-11-18 12:05:08 +09:00
JP Simard 8a30cb2e3d organize Xcode project
make Extensions, Models & Protocols groups under SourceKittenFramework
2015-11-15 15:07:25 -08:00