Commit Graph

179 Commits

Author SHA1 Message Date
Marcelo Fabri d9eda655bf PR feedback 2017-01-02 17:49:54 -02:00
JP Simard 8906da640c perform Cache factory while locked 2017-01-02 09:52:01 -08:00
JP Simard 53d0cf6975 fix incorrect flatMap usage to use map instead 2017-01-02 09:47:48 -08:00
JP Simard 8774a921a6 use DispatchQueue.concurrentPerform rather than rolling our own
also remove parallelForEach from SwiftLintFramework's public interface
since calling the GCD API is almost as concise and avoids polluting the
public API.

Finally, also remove the "fast" path for parallelMap since GCD should
do the reasonable thing for us here.
2016-12-31 17:06:02 -08:00
JP Simard 28813fce08 extend Array with parallelMap, parallelFlatMap and parallelForEach 2016-12-30 23:08:23 -08:00
JP Simard 8a4671ecc5 make Cache thread-safe
and make some of its members private instead of fileprivate
2016-12-30 23:07:47 -08:00
JP Simard da555b8a3b minor spacing fixes 2016-12-30 18:21:11 -08:00
JP Simard a50a0bee06 move array(of:) into other unconstrained Array extension 2016-12-30 18:21:11 -08:00
Marcelo Fabri 8c1532691d Make object_literal rule work with Swift 2.3 2016-12-30 17:57:30 -02:00
Marcelo Fabri 7056434992 Add object_literal rule
Fixes #1060
2016-12-30 17:57:30 -02:00
Marcelo Fabri aea1fd3538 Fix false positives on closure rules with Swift 2.3
Fixes #1019
2016-12-29 18:18:06 -02:00
Marcelo Fabri d6a15f7341 PR feedback 2016-12-26 13:34:50 -02:00
Marcelo Fabri c43f808cfc Re-enable ConfigurationTests.testExcludedPaths 2016-12-26 13:32:13 -02:00
Marcelo Fabri 9d64a22426 Re-enable testVariableName and testTypeName on Linux 2016-12-26 13:32:13 -02:00
Marcelo Fabri c6ac9b919c Add redundant_void_return rule
Fixes #1066
2016-12-26 01:01:04 -02:00
JP Simard 8ce031ff5f add substructure member to Dictionary+SwiftLint.swift 2016-12-23 12:35:01 -08:00
Marcelo Fabri 47c6ae5c2f Check if protocol inherits from another Delegate 2016-12-23 16:34:03 -02:00
Marcelo Fabri 608a2725c8 Add class_delegate_protocol rule
Fixes #1039
2016-12-23 02:37:44 -02:00
Marcelo Fabri b18c98084c Fix existing violations 2016-12-22 11:57:06 -02:00
Marcelo Fabri 5cccc12eb7 Style changes because of the 120 length limit 2016-12-20 12:10:11 -02:00
Marcelo Fabri 23a0b03fe8 Fixing violations 2016-12-19 21:20:58 -02:00
Marcelo Fabri 3f6ca7611a Fix violations 2016-12-19 20:08:17 -02:00
Marcelo Fabri e854701fb2 Refactoring shared code 2016-12-15 19:57:49 -02:00
Fabian Ehrentraud 2f8c54d3c7 uppercase XML 2016-12-13 12:33:05 -08:00
Fabian Ehrentraud 96aa86b500 moved String+XML.swift to Extensions folder and fixed header comment 2016-12-13 12:33:05 -08:00
JP Simard 8b49cd36b5 Merge pull request #967 from marcelofabri/void-return-rule
Void return rule
2016-12-13 12:04:01 -08:00
JP Simard 3f7c010be8 fix specifying multiple rule identifiers in comment commands 2016-12-13 08:55:05 -08:00
Marcelo Fabri 7af7eb8fbe Handling curried declarations 2016-12-13 11:57:43 -02:00
Marcelo Fabri 1351fdb643 Fix violations for void_return rule 2016-12-13 10:41:08 -02:00
JP Simard 11bfa938ae Merge pull request #960 from marcelofabri/closure_parameter_position
Add closure_parameter_position rule
2016-12-13 01:33:00 -08:00
Marcelo Fabri 5359582782 Refactoring SwiftExpressionKind 2016-12-12 22:27:46 -02:00
Marcelo Fabri a48097103a Add closure_parameter_position rule
Fixes #931
2016-12-12 21:12:45 -02:00
Marcelo Fabri 9c43a21fed Merge branch 'master' into attributes-rule 2016-12-11 23:46:18 -02:00
JP Simard 8c171458f8 make QueuedPrint.swift compile on Linux
by adding an explicit `import Dispatch` and disabling the `atexit_b` call
on Linux. This just means that we won't be able to guarantee that the print()
buffer will have been flushed at program exit. Hopefully this doesn't
cause too many issues.
2016-12-11 14:04:49 -08:00
JP Simard 876aa26a1d add type aliases for NSRegularExpression and NSTextCheckingResult
to align Linux and Darwing code.
2016-12-11 14:04:49 -08:00
JP Simard da1d0ba876 make FileManager.filesToLintAtPath(_:) compile on Linux
by addressing differences in FileManager APIs on Linux and Darwin
2016-12-11 14:04:49 -08:00
JP Simard 31814c36c4 set result of two methods to _ to avoid warnings on Linux
also filed https://github.com/apple/swift-corelibs-foundation/pull/740
and https://github.com/apple/swift-corelibs-foundation/pull/741

to fix upstream
2016-12-11 14:04:49 -08: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
Daniel Duan 00bfe3c77e abstract attribute retrieval from SourceKit
Extracting attribute values enclosed in SourcKit dictionary is common enough to
warrant a utility function.
2016-12-11 01:51:33 -08:00
Marcelo Fabri 0afe9a8b19 Enabling more rules in SwiftLint itself 2016-12-10 19:12:40 -02:00
Marcelo Fabri 2ddf7757d7 Merge branch 'master' into attributes-rule 2016-12-09 14:50:48 -02:00
Marcelo Fabri 13b0cfe623 Fixing inconsistencies 2016-12-08 18:29:57 -02:00
JP Simard a57526d639 omit 'self.' references when not ambiguous 2016-12-08 01:25:54 -08:00
JP Simard b409a056e5 refactor Array.unique and Array.group(by:) 2016-12-07 23:26:43 -08:00
Michał Kałużny d97632e52d Add human readable reporter that’s also funny because emoji. 2016-12-07 23:13:59 -08:00
Marcelo Fabri 1d42d29714 Merge branch 'master' into attributes-rule 2016-12-04 18:36:06 -02:00
Marcelo Fabri 0c018a15c7 Swift 3 migration 2016-12-04 18:19:44 -02:00
JP Simard 19fad01b29 make all enum members lowercase to comply with Swift 3 API Guidelines 2016-12-01 22:16:21 -08:00
JP Simard 0b481f1e16 change Array.arrayOf(_:) to Array.array(of:) 2016-12-01 18:09:38 -08: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