Commit Graph

1495 Commits

Author SHA1 Message Date
JP Simard 99d13d14a3 remove workaround for SR-3448/SR-3449
as they were fixed in the 3.1 release
2017-05-25 07:58:04 -07:00
Marcelo Fabri fd5ce1c4b0 Fix false positive in empty_enum_arguments rule
Fixes #1549
2017-05-25 04:57:11 +02:00
Marcelo Fabri 32e38c96cf Add kinds(inByteRange:) 2017-05-25 04:55:47 +02:00
JP Simard 0071b8c50d remove redundant protocol inheritance
since 'ConfigurationProviderRule' already inherits from 'Rule'
2017-05-24 15:36:58 -07:00
JP Simard 8a9b1023e1 fix style issues in ClosureSpacingRule 2017-05-24 13:26:19 -07:00
J Cheyo Jimenez 4b927d1479 made closure_spacing correctable 2017-05-24 13:07:38 -07:00
JP Simard 0e50216114 Merge pull request #1557 from realm/jp-fix-overlapping-regions
Fix overlapping commands causing incorrect Region generation
2017-05-24 12:22:01 -07:00
JP Simard 592537966c make Region & Command structs conform to Equatable 2017-05-24 11:33:39 -07:00
Marcelo Fabri bdcfe1b2cf Merge pull request #1551 from realm/write-cache
Split cache into read cache and write cache
2017-05-24 17:38:15 +02:00
Marcelo Fabri 9a5e30e794 Split cache into read cache and write cache 2017-05-24 17:03:51 +02:00
JP Simard bb50a4e8e5 fix overlapping commands causing incorrect Region generation
fixes #1388
2017-05-23 13:38:24 -07:00
JP Simard eef39595f6 move cache-related Configuration code into Configuration+Cache.swift 2017-05-23 11:22:55 -07:00
JP Simard b19e0de6e4 fix non-root configs logging warnings more than once 2017-05-23 11:22:55 -07:00
JP Simard 201a74ef0b recursively call extractCallsToSuper(methodName:) 2017-05-23 10:26:13 -07:00
JP Simard 8ed4424a9a release 0.19.0-rc.1 2017-05-22 14:09:33 -07:00
JP Simard 572754f707 Merge pull request #1530 from realm/jp-reenable-cache-v2
Reenable cache
2017-05-21 22:43:12 -07:00
Marcelo Fabri 9d67308a92 Merge pull request #1511 from marcelofabri/protocol_property_accessors_order
Add protocol_property_accessors_order rule
2017-05-22 00:37:46 +02:00
Marcelo Fabri 12360cc386 Use ASTRule and check if token is ACL 2017-05-22 00:13:19 +02:00
J Cheyo Jimenez aef7f81056 Added NoExtensionAccessModifierRule 2017-05-21 23:53:56 +02:00
Marcelo Fabri 32913fe03e Merge pull request #1410 from sammy-SC/shorthand_operator-false-positive
Prevent false positive in shorthand_operator rule
2017-05-21 23:40:11 +02:00
Marcelo Fabri 09c29b169d Fix false positive in syntactic_sugar rule when using nested types
Fixes #1508
2017-05-21 23:17:53 +02:00
JP Simard 3968b01bb6 update tests to reflect unicode fixes in SourceKitten 2017-05-19 14:10:24 -07:00
JP Simard cea6f43f37 make PrivateUnitTestRule & its configuration conform to CacheDescriptionProvider 2017-05-19 09:30:09 -07:00
JP Simard 0c0952046c ensure deterministic consoleDescription & cacheDescription generation 2017-05-19 09:25:53 -07:00
JP Simard 416384c4a5 Merge pull request #1526 from realm/jp-xcode-reporter-line-fallback
Fall back to line 1 when no line is provided & reporting with `xcode`
2017-05-18 15:42:50 -07:00
JP Simard 2704b3e1de report file_header violations on line 1 for all reporters 2017-05-18 15:11:50 -07: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 97bdac211a keep a single cache file for all of SwiftLint 2017-05-18 14:45:46 -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 f639ae95f1 add CacheDescriptionProvider protocol
to provide more complete descriptions for cache invalidation
purposes.
2017-05-18 14:31:33 -07:00
JP Simard 903b48f4da derive Configuration.cacheDescription in all cases
rather than just when using one of many code paths in one of many
initializers
2017-05-18 13:59:24 -07:00
JP Simard 70bcb2c4e5 add LinterCache.Key enum
rather than use hardcoded, duplicate string literals
2017-05-18 13:59:24 -07:00
JP Simard 923f38c11b simplify FileManager.modificationDate(forFileAtPath:) impl 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
JP Simard 385d726e52 simplify Configuration.swift's usage of its default file manager 2017-05-18 13:04:09 -07:00
JP Simard 8c9cba0c0f fallback to line 1 when no line is provided & reporting with xcode
this is a generalization of the fix from #1521
2017-05-17 14:56:46 -07:00
Richard Hodge 32c58aaf5a Update file_header rule to trigger on line 1 for files that are missing a header. (#1521)
Fixes #1520
2017-05-17 16:19:31 +02:00
JP Simard 65f32a14dd refactor CustomRules.validate(file:) 2017-05-16 11:28:01 -07:00
JP Simard d8ca9cb1fb use default implementation of configurationDescription
for ConditionalReturnsOnNewlineRule
2017-05-16 11:26:22 -07:00
Samuel Susla 42476d06bc Combine two regexes into one 2017-05-16 19:18:23 +01:00
JP Simard 04824c9b51 move 'AccessControlLevel.swift' from 'Extensions' to 'Models' 2017-05-16 10:58:49 -07:00
JP Simard 92043af1c0 rename ConditionalReturnsOnNewline to ConditionalReturnsOnNewlineRule
to match conventions used for rules
2017-05-16 10:58:47 -07:00
Marcelo Fabri 98dc0f78f6 Add protocol_property_accessors_order rule
Fixes #1504
2017-05-16 08:10:04 +02:00
JP Simard 61e9b39327 prefer contains over first(where:) != nil 2017-05-15 11:50:53 -07:00
JP Simard bb4c94be27 fold patternKind & pattern into flatMap block
since these are string literals, they'll only be included once in the binary
2017-05-15 11:17:06 -07:00
Marcelo Fabri 85bd94d33a Merge pull request #1510 from marcelofabri/ignoreOptionalTry-default-false
Change the default of ignoreOptionalTry to false in UnusedOptionalBindingRule
2017-05-15 00:38:19 +02:00
Marcelo Fabri eec8935091 Merge pull request #1444 from jaherhi/identifier_name_allow_non_alphanumeric_and_uppercase_characters
Add options to disable some checks for identifier_name rule
2017-05-15 00:31:39 +02:00
Marcelo Fabri 1e115be030 Change the default of ignoreOptionalTry to false in UnusedOptionalBindingRule
To avoid breaking changes.
2017-05-15 00:19:07 +02:00