Commit Graph

682 Commits

Author SHA1 Message Date
JP Simard ea33f68c85 fix compilation on Linux 2016-12-15 00:36:16 -08:00
JP Simard 55004d554c make VoidReturnRule correctable 2016-12-14 17:13:17 -08:00
Marcelo Fabri dc5020441d Date 2016-12-14 16:54:10 -02:00
Marcelo Fabri 3262e70e1a Excluding curried functions 2016-12-13 18:05:39 -02:00
Marcelo Fabri d465d7840e Add empty_parameters rule
Fixes #573
2016-12-13 18:05:38 -02:00
Marcelo Fabri 7af7eb8fbe Handling curried declarations 2016-12-13 11:57:43 -02:00
Marcelo Fabri c862e810b5 Handling curried functions 2016-12-13 10:41:09 -02:00
Marcelo Fabri e786f676eb Add void_return rule
Fixes #964
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
JP Simard bbf594dd08 fix indentation in ClosureParameterPositionRule 2016-12-13 01:04:24 -08:00
JP Simard 80e34272a2 minor changes to ProhibitedSuperConfiguration 2016-12-13 00:11:55 -08:00
JP Simard bfd2c37d9a simplify ProhibitedSuperRule.validateFile(...) 2016-12-12 23:59:41 -08:00
Aaron McTavish 8fbb4c431b Continue consolidating guard statement
Per code review feedback from @jpsim on PR #971.
2016-12-13 07:29:54 +00:00
Aaron McTavish 3aed7c415e Consolidate guard statements
Per code review feedback from @jpsim on PR #971.
2016-12-13 07:22:15 +00:00
Aaron McTavish f54c9c4d5a Add ProhibitedSuperRule
Resolves #970: `Rule: Methods calling super that should not`
2016-12-13 07:22:11 +00:00
Marcelo Fabri b599dc49cb Make AttributesRule opt-in 2016-12-12 23:42:18 -02:00
Marcelo Fabri 482dd16833 Dates 2016-12-12 23:04:42 -02:00
Marcelo Fabri e4a556dea5 Handle consecutive lines with attributes 2016-12-12 23:02:04 -02:00
Marcelo Fabri 85dede2c79 Merge branch 'master' into attributes-rule 2016-12-12 22:36:21 -02: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
JP Simard c5bcece945 Merge pull request #955 from marcelofabri/typealias-name
`type_name` rule now validates `typealias` and `associatedtype`
2016-12-12 14:05:59 -08:00
JP Simard 396dcb2e99 prefer passing function to filter 2016-12-12 13:59:47 -08:00
Marcelo Fabri fce551ae8a Validating associatedtypes
Fixes #959
2016-12-12 02:43:45 -02:00
Marcelo Fabri 7a4325220e Using character offset for regex result 2016-12-12 02:26:21 -02:00
Marcelo Fabri fd09fde10e Trying to fix Linux build 2016-12-12 01:32:36 -02:00
Marcelo Fabri 6752739dac Using .bridge() to run on Linux 2016-12-12 00:27:43 -02:00
Marcelo Fabri 9c43a21fed Merge branch 'master' into attributes-rule 2016-12-11 23:46:18 -02:00
Marcelo Fabri b1812b4eb1 Using .bridge() 2016-12-11 23:45:33 -02:00
Marcelo Fabri 0a03476745 PR feedback 2016-12-11 23:44:15 -02:00
Marcelo Fabri 33166f8f88 Fix traling_comma when using commas in comments.
Fixes #940
2016-12-11 23:44:15 -02:00
Marcelo Fabri 6476d85332 type_name rule now validates typealias too
Fixes #49
2016-12-11 23:35:36 -02:00
JP Simard 89526264db improve RegexConfiguration 2016-12-11 16:49:28 -08:00
JP Simard 3431ef4798 improve PrivateUnitTestRule 2016-12-11 16:41:45 -08:00
JP Simard 38c221b698 break up SeverityConfiguration.applyConfiguration(_:)
to help the type checker
2016-12-11 16:23:49 -08:00
JP Simard 54acf03983 use NSRegularExpression with a placeholder pattern to compile on Linux
since `NSRegularExpression.init()` isn't available on Linux yet.
2016-12-11 14:04:49 -08:00
JP Simard d8cdad852a clean up regex code in StatementPositionRule.swift 2016-12-11 14:04:49 -08:00
JP Simard 49b5ee665d omit needless types in static calls in PrivateUnitTestConfiguration.swift 2016-12-11 14:04:49 -08:00
JP Simard a5a1ed7a70 don't omit options param in NSRegularExpression calls
since these aren't optional on Linux, so this will help align
cross-platform code.
2016-12-11 14:04:49 -08:00
JP Simard 05fc8f3110 Merge pull request #962 from realm/jp-casts-refactor-file-header-configuration
eliminate needless conditional casts in FileHeaderConfiguration
2016-12-11 14:03:25 -08:00
JP Simard 43edeeba25 eliminate needless conditional casts in FileHeaderConfiguration 2016-12-11 13:48:41 -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 b9835c3828 Add rule to ban dynamic inline functions
When a class method is marked as both `dynamic` and `@inline(__always)`, its
dispatch behavior is not well defined. Therefore this specific combination
should be discouraged.
2016-12-11 01:52:39 -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
JP Simard 7e1af50dc6 parentheses 2016-12-10 22:34:04 -08:00
Marcelo Fabri 0209c461b3 Add empty_parentheses_with_trailing_closure rule
Fixes #885
2016-12-11 02:33:23 -02:00
Marcelo Fabri 09fb1eb93e Fix false negatives in AttributesRule 2016-12-09 19:39:25 -02:00
Marcelo Fabri 2ddf7757d7 Merge branch 'master' into attributes-rule 2016-12-09 14:50:48 -02:00
Marcelo Fabri 205c308100 Merge pull request #904 from marcelofabri/file-header-rule
Add FileHeaderRule
2016-12-09 01:22:58 -02:00
JP Simard 43380cefe0 refactor RedundantStringEnumValueRule.swift
to consolidate duplicate code and generally simplify the code
2016-12-08 13:33:05 -08:00