Cihat Gündüz
7d03a75caa
Use the new config options in implementation
2017-06-15 06:07:43 +02:00
Cihat Gündüz
ad03a2f2d0
Add ObjectLiteralConfiguration with color/image options
...
This fixes #1587 by implementing the discussed option config.
2017-06-15 06:07:43 +02:00
Marcelo Fabri
6c9766d01c
Fix empty_count false positive in words with "count"
...
Fix #1622
2017-06-14 17:49:12 +02:00
Marcelo Fabri
561653bcb2
Use prefix(while:) instead of partitioned(by:)
2017-06-14 14:33:04 +02:00
JP Simard
81105b70db
fix custom rules not working correctly with comment commands
2017-06-13 22:47:52 +02:00
Otávio Lima
729fab3ffe
Add missing triggering cases involving subscript in force_unwrapping rule
...
Additionally fixes false positives
Fixes : #614 , #977
2017-06-13 21:06:15 +02:00
Marcelo Fabri
77588f0f29
PR feedback
2017-06-13 18:38:07 +02:00
변우식
c3fcdf58c3
UnusedClosureParameterRule Crash
...
- If closure parameter is unicode, it calculate length 1, but its real length is 3. So when running byteRangeToNSRange, it accured crash in String+SourceKitten.swift:131.
2017-06-13 18:38:07 +02:00
Marcelo Fabri
fd231b607d
Fix existing violations
2017-06-13 16:12:58 +02:00
Marcelo Fabri
d123b47317
Add vertical_parameter_alignment_on_call rule
2017-06-13 16:12:58 +02:00
JP Simard
b9bec52f11
use function syntax over closure syntax
2017-06-02 14:10:02 -07:00
Marcelo Fabri
332b51a4c2
Trigger violation on declarations with explicit ACL
2017-06-02 21:25:07 +02:00
Marcelo Fabri
d1c4502974
Fix issue in ExplicitTopLevelACLRule
2017-06-02 21:24:55 +02:00
Marcelo Fabri
441bece9da
Add extension_access_modifier rule
2017-06-02 21:24:55 +02:00
Marcelo Fabri
2ac58aa621
Merge pull request #1598 from realm/bugfix-1597
...
Fix false positive in empty_enum_arguments rule
2017-06-02 21:08:38 +02:00
Marcelo Fabri
2045780476
Merge pull request #1581 from marcelofabri/fix-1525
...
Don't trigger `discarded_notification_center_observer` when the observer is returned
2017-06-02 21:06:37 +02:00
Marcelo Fabri
7e256f4abe
Fix false positive in empty_enum_arguments rule
...
Fixes #1597
2017-06-02 13:27:56 +02:00
Anders Hasselqvist
7126d9afa1
Match (Void) as return type in the void_return rule
...
Update the regexp to match on 0 or 1 occurence of `Void` within
the parentheses.
2017-05-29 16:55:06 +09:00
Marcelo Fabri
9b0e25977a
Don't trigger discarded_notification_center_observer when the observer is returned
...
Fixes #1525
2017-05-28 18:17:07 +02:00
Marcelo Fabri
6fdf80be29
Don't trigger private_unit_test when a method has parameters
...
Fixes #1532 .
2017-05-28 17:54:31 +02:00
Markus Gasser
a7db3208cd
Ignore overriddes in FunctionParameterCountRule
2017-05-27 09:59:52 +02:00
Ornithologist Coder
5584bd5710
Includes all function declarations
2017-05-26 16:01:18 +02:00
Ornithologist Coder
48bb6c77d4
Adds multiline method definition rule
...
Parameters of methods and functions should be either on the same line,
or one per line.
2017-05-26 14:54:01 +02:00
JP Simard
b59743f848
refactor ForceUnwrappingRule
...
* use 'nsstring.length' instead of computing 'contents.utf16.count'
* avoid over-bridging
* use 'guard let' instead of 'if let' with large body
* use shorter, more focused functions
* remove function_body_length rule disabling no longer necessary
* delay computation of certain variables until necessary
* fix misleading variable names
* generally reduce indentation
2017-05-25 14:01:53 -07:00
JP Simard
51833fe1a1
avoid over-bridging
2017-05-25 11:34:55 -07:00
JP Simard
20f57df3a9
pass function to flatMap in ShorthandOperatorRule
2017-05-25 11:31:10 -07:00
JP Simard
bc622e803d
fix ExplicitTopLevelACLRule
...
when 'internal' keyword isn't for the declaration being evaluated
2017-05-25 11:18:00 -07:00
JP Simard
acc7808b04
use kinds(inByteRange:) in more places
...
CommaRule, ExplicitTopLevelACLRule, ForceUnwrappingRule, ForWhereRule
2017-05-25 11:18:00 -07:00
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
201a74ef0b
recursively call extractCallsToSuper(methodName:)
2017-05-23 10:26:13 -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
2704b3e1de
report file_header violations on line 1 for all reporters
2017-05-18 15:11:50 -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
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