Commit Graph

93 Commits

Author SHA1 Message Date
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 40ade98710 Update SourceKitten to 0.28.0 (#3011) 2020-01-03 16:47:18 -08:00
JP Simard beaa2a8a87 Update Commandant and SourceKitten, drop Result (#2947) 2019-11-07 10:59:16 -08:00
Marcelo Fabri f5174b3168 Update SourceKitten to 0.26.0 2019-10-08 00:51:18 -07:00
JP Simard e2d325c6f5 Update SourceKitten to 0.24 (#2819)
Released here: https://github.com/jpsim/SourceKitten/releases/tag/0.24.0
2019-07-21 22:48:40 -07:00
JP Simard 7dd437b3cb Bump SourceKitten dependency to 0.23.2 (#2756)
Which adds `Equatable` and `Hashable` conformance to `File`.
2019-05-12 14:51:56 -07:00
JP Simard acfc592ee0 Mark Swift 5 as supported (#2730)
* Mark Swift 5 as supported

* Only set a single Swift version on podspec

Multiple swift versions requires CocoaPods 1.7.0, which is still
in beta.

* Modernize ruby hash syntax

* Update SourceKitten to 0.23.1
2019-04-29 11:55:16 -07:00
Marcelo Fabri 3a36212b94 Swift 5 support (#2720)
* Update project to compile with Xcode 10.2

* Fix explicit_acl with Swift 5

* Update macOS VM image

* Fix ConfigurationTests on Swift 5

* Update Podspec

* Workaround SR-10486 to fix validation tests

* Fix testDetectSwiftVersion on Swift 5

* Update specs repo when validating CocoaPods spec

* Fix redundant_set_access_control tests

* Manually update Package.resolved

* Use .upToNextMinor

* [Azure Pipelines] Add `sw_vers`

* Relax expecting conditions for crashing output in `testSimulateHomebrewTest()`

Because TSAN makes `swiflint` to produce additional output on crashing.

* Add CHANGELOG entry

* Ignore extensions in explicit ACL rules

* Work around SR-10486 for Sourcery
2019-04-28 21:10:06 -07:00
JP Simard 2d0d56985f Clean up CryptoSwift references (#2522)
* Clean up CryptoSwift references

* Add a changelog entry

* Remove unused import
2018-12-20 10:59:49 -08:00
JP Simard fad2a85b0b Update SourceKitten to 0.22.0 2018-11-27 10:55:50 -08:00
JP Simard 45dd66bae6 Remove CryptoSwift dependency if not needed (#2485) 2018-11-26 16:31:26 -08:00
JP Simard d744ac53e2 Update SourceKitten to 0.21.3 (#2470) 2018-11-19 10:44:02 -08:00
JP Simard 5901d3075f Require Swift 4.2 (#2466)
This bumps the minimum version required to build SwiftLint to 4.2. The primary motivating factor to drop support for Swift 4.0-4.1.x is that SwiftLint now uses CryptoSwift, which requires 4.2.

* Add changelog entry

* Remove --allow-warnings flag from CocoaPods commands

* Update CryptoSwift to 0.13.0

* Migrate to Swift 4.2

* Remove CircleCI tests for Swift < 4.2

* Update English and Chinese README

Korean README doesn't yet have a version table like this.

* Update gems

* Add changelog entry for fixed compiler warnings

* Update CocoaPods to 1.6.0.beta.2

To work around https://github.com/CocoaPods/CocoaPods/issues/7708
2018-11-18 17:32:25 -08:00
JP Simard d768897f1d Improve performance of collecting files to lint and lint cache lookups (#2465)
Performance has gotten pretty bad for complex SwiftLint configurations like the one used for Lyft's iOS code base involving lots of files in the directories being linted, large configuration files and many nested configuration files.

Two main areas were particularly ripe for improvement were:

1. Collecting which files to lint
2. Lint cache lookups

### Collecting which files to lint

Improve this by:

* using an NSOrderedSet to remove excluded paths instead of `Array.filter`
* parallelizing calls to `filesToLint` for all paths to lint and exclude
* using `FileManager.subpaths(atPath:)` instead of `enumerator(atPath:)`

|Change|Before|After|Speed up|
|-|-|-|-|
|NSOrderedSet|2.438s|0.917s|2.659x|
|Parallel Flat Map|2.438s|2.248s|1.085x|
|Subpaths|0.939s|0.867s|1.083x|
|**Total**|**2.438s**|**0.720s**|**3.386x**|

### Lint cache lookups

By using an MD5 hash of the Configuration description from CryptoSwift as the cache key instead of instead the full description, we can drastically speed up cache lookups for projects with complex SwiftLint configurations. I think the dictionary lookup for very large string keys doesn't perform very well.

---

* Speed up Configuration.lintablePaths

* Improve cache lookup performance by up to 10x

By using an MD5 hash of the Configuration description from CryptoSwift
as the cache key instead of instead the full description.

* Add changelog entries

* Swift 4.0 & Linux compatibility

* os(Darwin) isn't a thing

* Allow warnings in pod lib lint

SwiftLint supports building with Swift 4.0 to 4.2.

There is no version of CryptoSwift to support both Swift 4.0 and
Swift 4.2.

So allow warnings for now. We'll make one more Swift 4.0 compatible
release, then we'll bump the build requirements to Swift 4.2 and
remove the `--allow-warnings` flag.
2018-11-18 14:39:02 -08:00
JP Simard 60f98ec50d Update dependencies (#2402) 2018-09-13 13:42:34 -07:00
JP Simard 93eb889495 Update dependencies 2018-08-05 11:17:35 -07:00
Norio Nomura 1846180abe Update SourceKitten to 0.21.1 in Cartfile* and submodules 2018-07-05 08:34:45 +09:00
JP Simard 42ec3fe646 Update dependencies 2018-05-30 14:08:16 +10:00
Marcelo Fabri 6acd5b2363 Update SourceKitten to 0.21.0 2018-04-24 09:24:03 -07:00
Norio Nomura 2f8b020d65 Update xcconfigs and change test target to use Mac-XCTest.xcconfig 2018-04-08 13:39:42 +09:00
Norio Nomura 7d0f239e2a Update dependencies
- Update SourceKitten from 0.19.1 to 0.20.0
- Update SWXMLHash from 4.3.6 to 4.6.0
- Update Yams from 0.5.0 to 0.7.0
2018-04-08 13:28:08 +09:00
JP Simard 623590acd1 Update dependencies 2018-02-01 15:35:41 -08:00
JP Simard 65f3941288 Update Commandant to latest master 2017-12-22 10:52:14 -05:00
JP Simard 284a7d5828 Point SwiftyTextTable to official repo & stable release of 0.8.0
Partially resolves #1962.
2017-12-22 10:49:33 -05:00
JP Simard 258ed9c196 Update dependencies
mostly to address previous deprecation warnings when compiling with
Swift 4.0.2.
2017-11-10 14:37:53 -08:00
JP Simard 3d0f0c0d1d Update dependencies 2017-10-19 21:51:42 -07:00
JP Simard 4f92226efb Update SourceKitten, SWXMLHash & Yams to latest versions 2017-09-10 13:29:36 -07:00
JP Simard 2d236bb1d9 Update dependencies
mostly for SourceKitten 0.18.1 which removes the long function bodies
compiler flag which has been causing problems on Xcode 9 beta 5.
2017-08-21 11:38:11 -07:00
JP Simard 7acacf6bdb update dependencies, mostly for SourceKitten 0.18 2017-07-12 10:11:27 -07:00
JP Simard ec372b3741 update submodules using Carthage 2017-05-22 13:33:23 -07:00
JP Simard 85a19d310b update dependencies
Commandant   5100432 -> 50789d7
Result       3.2.1   -> 3.2.2
SourceKitten 0.17.1  -> 0.17.4
SWXMLHash    3.0.4   -> 3.1.0
Yams         0.3.1   -> 0.3.2
2017-05-19 14:10:24 -07:00
JP Simard 3dd5c93649 update Yams to 0.3.1 2017-04-06 11:43:25 -07:00
Norio Nomura 5badb2853c Update SourceKitten to 0.17.1 2017-04-03 10:13:49 +09:00
Norio Nomura b5cba7ae40 Replace YamlSwift with Yams 2017-04-03 09:16:04 +09:00
Natan Rolnik ef28e204e2 Allow displaying only enabled rules in RulesCommand 2017-02-15 13:09:43 +02:00
JP Simard 7999973eb9 update SourceKitten to 0.17 2017-01-10 13:50:32 -08:00
JP Simard 7acdc1dd6c bump dependencies 2016-12-18 16:57:21 -08:00
Norio Nomura a6b6354644 Update SourceKitten 2016-11-08 19:30:45 +09:00
Norio Nomura df28dcfc13 Update YamlSwift to 3.1.0 2016-11-08 19:29:11 +09:00
Norio Nomura 3ff76e7ce8 Update SourceKitten 2016-11-04 20:24:21 +09:00
Norio Nomura e92503a50d Update dependencies 2016-10-07 15:25:32 +09:00
Norio Nomura a99075ac8a Update SourceKitten to master
That fixed https://github.com/jpsim/SourceKitten/issues/259
2016-09-25 09:34:19 +09:00
Syo Ikeda c249082985 Update to SourceKitten 0.14.1 2016-09-23 10:18:52 +09:00
Syo Ikeda 79244bdf33 Update SourceKitten 2016-09-20 10:26:56 +09:00
Syo Ikeda 996699e08f Update YamlSwift to 1.5.0 2016-09-19 14:06:40 +09:00
Syo Ikeda 3c21785556 Update / Pin dependencies for Swift 2.3 support 2016-09-16 17:22:06 +09:00
Norio Nomura b4a8d3db94 Update dependencies since PRs are merged 2016-09-01 15:23:40 +09:00
Norio Nomura df353859fb Update dependencies
carthage update --no-build
2016-08-23 23:52:09 +09:00
JP Simard cf5039c14e update dependencies 2016-07-26 10:11:03 -07:00
JP Simard 9df3723ab8 update dependencies 2016-06-10 19:54:33 -07:00