Commit Graph

1124 Commits

Author SHA1 Message Date
Marcelo Fabri ccdff37f1d PR feedback 2017-01-04 15:35:07 -02:00
Marcelo Fabri 66403ec5fa Handle other protocols 2017-01-04 15:34:19 -02:00
Marcelo Fabri c381720d3e Add expressible_by_array_literal_init rule
Fixes #1096
2017-01-04 15:34:19 -02:00
JP Simard cce3505f1b pass function reference rather than create a small closure 2017-01-03 23:30:55 -08:00
JP Simard 6e994776df use guard instead of nested if let 2017-01-03 23:17:28 -08:00
Marcelo Fabri 12a66d4fe1 Remove handleAlias function 2017-01-03 18:04:37 -02:00
Marcelo Fabri 3b682fb116 Remove support to non-deprecated aliases 2017-01-03 16:14:34 -02:00
Marcelo Fabri 3c9d16509b Fix unit tests 2017-01-02 18:27:28 -02:00
JP Simard 4519f463d8 extract Linter.getStyleViolations' parallelFlatMap into Rule.performLint 2017-01-02 12:01:33 -08:00
Marcelo Fabri d9eda655bf PR feedback 2017-01-02 17:49:54 -02:00
Marcelo Fabri f5569986a3 Only dispatching if there are identifiers 2017-01-02 16:26:16 -02:00
Marcelo Fabri d9ae32bfd1 Use Set for aliases in RuleDescription init 2017-01-02 16:23:03 -02:00
Marcelo Fabri c0aacd6adb Log deprecation warns for commands 2017-01-02 16:23:03 -02:00
Marcelo Fabri a5683fa393 PR feedback 2017-01-02 16:21:10 -02:00
Marcelo Fabri 2e8ada85b1 Logging deprecation warning and adding tests 2017-01-02 16:21:10 -02:00
Marcelo Fabri 07b14d852f Handle duplicated alias configuration 2017-01-02 16:21:10 -02:00
Marcelo Fabri 2e9e016723 Running "disable" tests on all aliases 2017-01-02 16:21:10 -02:00
Marcelo Fabri df8429d2eb Add support for rule aliases 2017-01-02 16:21:10 -02:00
JP Simard 95a468a723 Merge branch 'master' into jp-parallelize
* master:
  use first(where:) instead of for loop in RulesCommand.swift
  remove unnecessary imports from AutoCorrectCommand.swift
  Typo in changelog
  Remove unnecessary import
  Avoid duplicating default value
  Update number_separator configuration in SwiftLint
  number_separator can be configured with a min length
  Enable more opt-in rules in SwiftLint
  Fix out of range exception in AttributesRule
  Fix trailing_comma crash
2017-01-02 09:55:32 -08: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
Marcelo Fabri 5282134fec Remove unnecessary import 2017-01-02 03:25:04 -02:00
Marcelo Fabri d44bf896b9 Avoid duplicating default value 2017-01-02 02:55:41 -02:00
Marcelo Fabri ef8bc05b89 Update number_separator configuration in SwiftLint 2017-01-02 02:51:12 -02:00
Marcelo Fabri 09a251a8f6 number_separator can be configured with a min length
Fixes #1109
2017-01-02 02:50:04 -02:00
Marcelo Fabri ca5914816f Enable more opt-in rules in SwiftLint 2017-01-02 01:59:34 -02:00
Marcelo Fabri f9a639715f Fix out of range exception in AttributesRule
Fixes #1105
2017-01-01 17:54:31 -02:00
Marcelo Fabri 1a9d2ef7e6 Fix trailing_comma crash
Fixes #921
2017-01-01 01:14:19 -02:00
JP Simard 253e1f4f86 make recording benchmarks thread-safe 2016-12-31 17:24:43 -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 d82ca686d2 parallelize getting violations for a single file 2016-12-30 23:08:26 -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 10f39b2562 Merge pull request #1098 from realm/jp-minor-improvements
Minor Improvements
2016-12-30 18:43:08 -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 5625b50f88 Avoid using Set(arrayLiteral:) 2016-12-30 23:54:25 -02:00
Marcelo Fabri 75c95607e6 PR feedback 2016-12-30 18:40:04 -02:00
Marcelo Fabri 8c1532691d Make object_literal rule work with Swift 2.3 2016-12-30 17:57:30 -02:00
Marcelo Fabri 2362e396f4 Supporting NSColor and NSImage 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
JP Simard 836269dbf6 Merge branch 'master' into uppercase-enums-swift-2.3 2016-12-30 11:31:11 -08:00
JP Simard 5f4203ad37 remove unnecessary flatMap Int64 conversion introduced in #1092 2016-12-30 11:23:35 -08:00
Marcelo Fabri 07776cc0bb Merge pull request #1092 from rakaramos/ignore-computed-delegates
Ignore computed delegates
2016-12-30 17:16:55 -02:00
JP Simard f36e28e0a6 prefer 'joined()' over 'joined(separator: "")'
since that's the default separator.

Rule for this requested in #1093.
2016-12-30 10:30:03 -08:00
Rafael Machado 1056e7300f Ignore computed delegates 2016-12-30 16:20:59 -02:00
Marcelo Fabri 1a91a3abe3 type_name rule validates enum values with Swift 2.3
Fixes #1090
2016-12-30 15:21:26 -02:00
Marcelo Fabri 6bd9bec6d7 PR feedback 2016-12-30 01:46:05 -02:00
Marcelo Fabri d75cd234f7 Run tests with Swift 2.3 set for SourceKitten
This should help preventing issues like #1019.
2016-12-30 00:06:51 -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