Commit Graph

26 Commits

Author SHA1 Message Date
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
Norio Nomura 2a0ac455bc 'flatMap' is deprecated: renamed to 'compactMap(_:)' 2018-04-08 13:28:09 +09:00
Marcelo Fabri ae0e21f0f8 Fix crash when saving cache
Fixes #2032
2018-03-24 21:23:14 -07:00
JP Simard 34f429b0a3 Fix caching on Linux
This has never worked for two reasons:

1. We've used dictionaries to represent cache descriptions, which
   don't guarantee stable ordering of keys across invocations.
   This is true both on Darwin and Linux, but in practice ordering
   varies significantly more on Linux.
2. Storing a `TimeInterval` value in a `[String: Any]` dictionary
   and retrieving it again will not be dynamically castable to
   `Double` or `TimeInterval` but will be castable to `Int`.
2017-10-26 12:23:13 -07:00
JP Simard b39b369d12 Fix setting Swift version when caching.
See https://github.com/realm/SwiftLint/pull/1790/files#r134323431.
2017-08-21 13:28:43 -07:00
Marcelo Fabri 0a07628d8c Invalidate cache when Swift version changes 2017-08-21 00:19:04 +02:00
Marcelo Fabri c01f4bd19f Enable extension_access_modifier rule 2017-07-21 21:08:52 +02:00
Marcelo Fabri e86763739f Move kind to RuleDescription 2017-07-02 15:50:16 +02:00
Marcelo Fabri 9a5e30e794 Split cache into read cache and write cache 2017-05-24 17:03:51 +02:00
JP Simard ca08d6598a move LinterCache+CommandLine to SwiftLintFramework
and make cacheURL an internal member of Configuration
2017-05-18 14:53:39 -07:00
JP Simard 690b567421 simplify serialized cache structure 2017-05-18 14:40:40 -07:00
JP Simard bd7169e40c cache each file with its own configuration cache description
to make the cache play nicely with nested configurations
2017-05-18 14:31:33 -07:00
JP Simard 258a80b5cc don't overwrite cache results from different versions 2017-05-18 14:31:33 -07:00
JP Simard 70bcb2c4e5 add LinterCache.Key enum
rather than use hardcoded, duplicate string literals
2017-05-18 13:59:24 -07:00
Víctor Pimentel 5ed010c9c0 Change LinterCache to use file modification dates instead of hashing files with a weak algorithm. 2017-05-18 13:39:05 -07:00
Marcelo Fabri 94f48f4ebd PR feedback 2017-01-10 13:09:18 -02:00
Marcelo Fabri 0cf433834e PR feedback 2017-01-05 12:01:47 -02:00
Marcelo Fabri e8ead8827b Make LinterCache thread-safe 2017-01-02 16:44:54 -02:00
Marcelo Fabri b3cd5008c0 Make LinterCache final 2016-12-31 01:42:18 -02:00
Marcelo Fabri 3d376241be Moving cache usage to the linter 2016-12-31 00:26:05 -02:00
Marcelo Fabri 77e4249a3d Improved cache structure 2016-12-31 00:24:54 -02:00
Marcelo Fabri a47385a64f Ignore cache if configuration has changed 2016-12-31 00:24:54 -02:00
Marcelo Fabri b1f62e2b63 Add some tests 2016-12-31 00:24:54 -02:00
Marcelo Fabri f1e33760f0 Fixing compile isse 2016-12-31 00:24:54 -02:00
Marcelo Fabri a92a24c598 Ignore cache when versions are different 2016-12-31 00:24:54 -02:00
Marcelo Fabri c698d021dc Initial cache implementation 2016-12-31 00:24:54 -02:00