Commit Graph

40 Commits

Author SHA1 Message Date
JP Simard d1df7af294
Deserialize syntax tree using byte tree 2018-11-28 10:39:44 -08:00
JP Simard 02113220d1
Migrate FallthroughRule to SwiftSyntax [skip ci] 2018-11-28 10:39:15 -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 b45c8e2610
Update SourceKitten to 0.21.1 in Package.* 2018-07-05 08:39:08 +09:00
JP Simard a87387438a
Remove Swift 3 from Package.swift versions 2018-05-30 14:10:45 +10:00
Marcelo Fabri 8d90dc706f Update SourceKitten on SPM 2018-04-24 22:32:44 -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 623590acd1
Update dependencies 2018-02-01 15:35:41 -08: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 ecc88531cf
git mv Package@swift-4.swift Package.swift 2017-10-04 13:49:40 -07:00
JP Simard 8af2334f23
add Commandant explicitly to Package.swift
the fact that it linked successfully in Swift 3 is considered a bug,
which has been resolved for Swift 4.

See https://bugs.swift.org/browse/SR-5493
2017-07-19 01:19:10 -07:00
JP Simard 7acacf6bdb
update dependencies, mostly for SourceKitten 0.18 2017-07-12 10:11:27 -07:00
Norio Nomura e62effd957
Change version of Yams to specifying by minor version in Package.swift 2017-04-03 10:16:55 +09:00
Norio Nomura b5cba7ae40
Replace YamlSwift with Yams 2017-04-03 09:16:04 +09: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 121d19b941
Support Swift Package Manager on macOS 2016-11-08 20:35:30 +09:00
JP Simard 5de378de4c update SourceKitten SPM version 2016-05-29 14:58:16 -07:00
JP Simard a6294c40d9 update dependencies 2016-04-20 23:06:02 +02:00
Norio Nomura 0a6faafee7 Update SwiftyTextTable to 0.3.0 2016-03-19 10:05:18 +09:00
Norio Nomura 070bbb87dd [SPM] Update `Package.swift` 2016-03-19 10:05:18 +09:00
Norio Nomura fa78d39ff8 [SPM] Update SourceKitten to 0.11.0 2016-03-19 09:31:19 +09:00
Norio Nomura 8c80d75b45 Update SourceKitten to 0.10 in Package.swift 2016-02-09 17:07:41 +09:00
Norio Nomura a59ed3ec89 Revert "Switch dependency to my fork for testing"
This reverts commit 26ab4d6e43.
2016-02-09 16:54:27 +09:00
Norio Nomura 26ab4d6e43 Switch dependency to my fork for testing 2016-02-09 11:10:11 +09:00
Scott Hoyt 4bcd56ec6a Pin SwiftyTextTable SPM 2016-02-05 19:17:11 -08:00
Scott Hoyt 9ae89d8a54 Merge pull request #483 from realm/sh-swiftytexttable
SwiftyTextTable
2016-02-05 16:18:33 -08:00
Norio Nomura ae7d7566d9 [SPM] point YamlSwift to original repo 2016-02-05 18:58:11 +09:00
Scott Hoyt f1734650d6 Update Package.swift for SwiftyTextTable dependency. 2016-02-04 15:37:04 -08:00
Norio Nomura 24a22e29c6 [SPM] Add forked `norio-nomura/swift-corelibs-xctest` to Package.swift as dependency
`norio-nomura/swift-corelibs-xctest` is forked for adding tag.
2016-02-03 13:04:55 +09:00
JP Simard f1fe795117 update dependencies 2016-02-01 17:45:36 -08:00
Norio Nomura 5ab83b33c3 Add `Package.swift`
That uses forked dependencies:
- https://github.com/norio-nomura/SourceKitten/
  Updated Package.swift
  Added `0.8.1-test` tag for fetching
- https://github.com/norio-nomura/Commandant/
  Added `0.8.3-test` tag for fetching
- https://github.com/norio-nomura/YamlSwift/
  Added Package.swift
  Fixed build error on swift-DEVELOPMENT-SNAPSHOT-2016-01-25-a
  Added `1.4.0-test` tag for fetching
2016-02-01 13:49:38 +09:00