Fabian Ehrentraud and JP Simard
ea5f3319ca
escape characters for xml reporters
2016-12-13 12:32:32 -08:00
JP Simard and GitHub
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
c862e810b5
Handling curried functions
2016-12-13 10:41:09 -02:00
Marcelo Fabri
1351fdb643
Fix violations for void_return rule
2016-12-13 10:41:08 -02:00
Marcelo Fabri
e786f676eb
Add void_return rule
...
Fixes #964
2016-12-13 10:41:08 -02:00
JP Simard and GitHub
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 and GitHub
bbf594dd08
fix indentation in ClosureParameterPositionRule
2016-12-13 01:04:24 -08:00
JP Simard and GitHub
80e34272a2
minor changes to ProhibitedSuperConfiguration
2016-12-13 00:11:55 -08:00
JP Simard and GitHub
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 and GitHub
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 and GitHub
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
5b98fbe2f6
make Command.swift compile on Linux
...
by addressing differences in APIs between Scanner on Linux and Darwin.
2016-12-11 14:04:49 -08: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
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 and GitHub
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 and GitHub
bda2b45c09
Merge pull request #958 from marcelofabri/empty-parentheses-closure
...
Add empty_parentheses_with_trailing_closure rule
2016-12-10 22:37:07 -08:00
JP Simard and GitHub
7e1af50dc6
parentheses
2016-12-10 22:34:04 -08:00