Commit Graph

31 Commits

Author SHA1 Message Date
JP Simard e7f4a8fd67
Update SourceKittenFramework to 0.31.0 2020-12-14 15:51:04 -05:00
JP Simard 9c672c774c
Update Yams 2020-12-11 11:20:00 -05:00
JP Simard b2b95cf403
Require Swift 5.2 or higher to build (#3413)
Swift 5.2 has been officially released for over 7 months now, there's no
reason to keep supporting earlier versions when _building_ SwiftLint.

However, SwiftLint still supports _linting_ back up to Swift 3.0.
2020-11-08 13:31:29 -05:00
JP Simard 15c25abc47
Update SourceKitten to 0.30.1 (#3367) 2020-09-23 08:34:46 -07:00
JP Simard 81e8501dd5
Update SourceKitten and Yams 2020-08-24 22:27:13 -04: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 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 94be5345b1
Update podspec to support multiple swift versions (#2769)
now that CocoaPods 1.7.0 is out.
2019-05-24 09:47:59 -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 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 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
Norio Nomura 3dcb07253f
Update Yams to 1.0 in podspec 2018-07-05 08:52:56 +09:00
Marcelo Fabri 6acd5b2363 Update SourceKitten to 0.21.0 2018-04-24 09:24:03 -07: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 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 7acacf6bdb
update dependencies, mostly for SourceKitten 0.18 2017-07-12 10:11:27 -07:00
JP Simard 4776a1bbe7
loosen podspec dependencies 2017-05-22 13:26:49 -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 a78f1a1c7f
Update podspec 2017-04-03 09:49:03 +09:00
JP Simard 3414df11b4
explicitly set podspec dependency versions 2017-02-09 11:28:55 -08:00
JP Simard 1654561341
point SourceKittenFramework pod dependency to 'SourceKittenFramework'
to reflect the change in https://github.com/jpsim/SourceKitten/pull/321
2016-12-18 17:03:28 -08:00
JP Simard 345e34f1a4
update podspecs to use make get_version 2016-12-06 22:10:05 -08:00
JP Simard 15848983c7
add pospec 2016-12-04 00:03:45 -08:00