Marcelo Fabri
27456823e3
Add number_separator opt-in rule
...
Fixes #924
2016-12-06 00:17:28 -02:00
JP Simard
576e1a5d4d
remove unnecessary .lowercased() calls
...
now that ViolationSeverity is already lowercase.
2016-12-01 22:29:09 -08:00
JP Simard
19fad01b29
make all enum members lowercase to comply with Swift 3 API Guidelines
2016-12-01 22:16:21 -08:00
JP Simard
811ab1db20
Merge pull request #840 from realm/nn-improve-failing-log-of-tests
...
Improve failing log output of tests
2016-12-01 21:55:25 -08:00
Norio Nomura
4072bd491f
Disable few tests related to docs
...
https://github.com/jpsim/SourceKitten/issues/269
2016-12-02 10:10:14 +09:00
Norio Nomura
f8beeb7cde
Fix crash in ReporterTests.testHTMLReporter() on swift test
2016-12-02 10:01:20 +09:00
Norio Nomura
cc24409391
Apply reviews
2016-12-01 12:09:12 +09:00
Norio Nomura
4aa4322991
Merge branch 'master' into swift3.0
...
* master:
TrailingCommaRule only triggers when multi-line
2016-12-01 11:39:02 +09:00
Norio Nomura
6ba6be24fa
Avoid line_length violation
2016-12-01 09:24:04 +09:00
Norio Nomura
523711061b
Remove surplus assertions from triggeringExamples
...
Removed:
- Comparing total count of violations and expected locations from all triggering examples
- Comparing count of violations and expected locations on each triggering examples
- Order based comparison between violations and expected locations
2016-12-01 09:24:04 +09:00
Norio Nomura
76fd4b50a4
Produce detailed log when expected location of triggeringExample is not violated at.
...
e.g.
> /Users/norio/github/SwiftLint/Tests/SwiftLintFramework/TestHelpers.swift:180: error: -[SwiftLintFrameworkTests.RulesTests testMissingDocs] : failed - triggeringExample did not violate at expected location:
> ```
> public func a↓() {}
> ```
2016-12-01 09:22:58 +09:00
Norio Nomura
ae14c90ba2
Produce detailed log when triggeringExample violated at unexpected location
...
e.g.
> /Users/norio/github/SwiftLint/Tests/SwiftLintFramework/TestHelpers.swift:173: error: -[SwiftLintFrameworkTests.RulesTests testMissingDocs] : failed - triggeringExample violate at unexpected location:
> ```
> public func a↓() {}
> ^ warning: Missing Docs Violation: Public declarations should be documented. (missing_docs)
> ```
2016-12-01 09:22:58 +09:00
Norio Nomura
9436e67968
Produce detailed log when triggeringExample without expected location does not violate
...
e.g.
> /Users/norio/github/SwiftLint/Tests/SwiftLintFramework/TestHelpers.swift:159: error: -[SwiftLintFrameworkTests.RulesTests testValidDocs] : failed - triggeringExample did not violate:
> ```
> /// docs
> public func no() -> (Int, Int) {return (1, 2)}
> ```
2016-12-01 09:22:58 +09:00
Norio Nomura
1beed4b201
Produce detailed log of generated violations from nonTriggeringExamples
...
e.g.
> /Users/norio/github/SwiftLint/Tests/SwiftLintFramework/TestHelpers.swift:136: error: -[SwiftLintFrameworkTests.RulesTests testMissingDocs] : failed - nonTriggeringExample violated:
> ```
> /// docs
> public func a() {}
> ^ warning: Missing Docs Violation: Public declarations should be documented. (missing_docs)
> ```
2016-12-01 09:22:58 +09:00
Norio Nomura
fab2ef9b33
Invoke XCTFail() on each corrections
2016-12-01 09:22:57 +09:00
Norio Nomura
363bcf5c73
Merge branch 'master' into swift3.0
...
* master:
add empty changelog section
update Releasing.md with `brew bump-formula-pr`
0.13.1: Heavy Cycle
remove unused function dictFromKeyValuePairs
add tests for reporterFromString(_:)
small refactoring of SwitchCaseOnNewlineRule.swift
# Conflicts:
# Source/SwiftLintFramework/Extensions/File+Cache.swift
# Source/SwiftLintFramework/Rules/SwitchCaseOnNewlineRule.swift
2016-11-30 22:33:16 +09:00
Norio Nomura
84ca11b6aa
Merge commit 'b22d1a93c93537acde79a2496031012489fe270d' into swift3.0
...
* commit 'b22d1a93c93537acde79a2496031012489fe270d':
Updating CHANGELOG entry
Updates existing code to respect TrailingCommaRule
Add configuration to enforce/forbid trailing comma
Fixing rebase
Addded TrailingCommaRule
2016-11-30 19:38:31 +09:00
Norio Nomura
1d7fbe17eb
Merge commit '3ce57ba71ac2167d44aae39095475669bb5ec98c' into swift3.0
...
* commit '3ce57ba71ac2167d44aae39095475669bb5ec98c':
Add NimbleOperatorRule
2016-11-30 18:50:24 +09:00
Norio Nomura
7c12a63e8f
Merge commit '58eb0f69c4055bb2cb89b3df278eca6ce0fb1c34' into swift3.0
...
* commit '58eb0f69c4055bb2cb89b3df278eca6ce0fb1c34':
generally clean up usage of swiftlint comment commands
update README to reflect the ability to specify multiple rules in commands
add changelog entry
allow specifying multiple rule identifiers in comment commands
# Conflicts:
# Source/SwiftLintFramework/Extensions/NSRegularExpression+SwiftLint.swift
# Source/SwiftLintFramework/Models/Command.swift
# Source/SwiftLintFramework/Rules/LegacyNSGeometryFunctionsRule.swift
# Tests/SwiftLintFrameworkTests/ConfigurationTests.swift
# Tests/SwiftLintFrameworkTests/IntegrationTests.swift
2016-11-30 18:42:40 +09:00
Norio Nomura
636efb5b14
Merge commit 'aeb5d7ae442d6b590e7693a7214098a9328f951a' into swift3.0
...
* commit 'aeb5d7ae442d6b590e7693a7214098a9328f951a':
Updating changelog
Updating regex after PR feedback
Adding SyntacticSugar rule
# Conflicts:
# Source/SwiftLintFramework/Extensions/File+Cache.swift
2016-11-30 18:10:10 +09:00
Norio Nomura
b9426fb78e
Merge commit '487f8cccdfe27771f6cd9ec46470a3b3578eaec4' into swift3.0
...
* commit '487f8cccdfe27771f6cd9ec46470a3b3578eaec4':
fix changelog entry: weak rule isn't opt-in
minor WeakDelegateRule formatting
fix up changelog entry
[weak_delegate] Better code style for testing string matching
Thinking back about it, WeakDelegate rule should in fact maybe not be Opt-In, but rather enabled by default
Additional code comments
[New Rule] weak_delegate
2016-11-30 17:27:44 +09:00
Norio Nomura
7593deff3f
Merge commit 'b591ec71085572825616e9ac0ed15450198b52bb' into swift3.0
...
* commit 'b591ec71085572825616e9ac0ed15450198b52bb':
minor Tests comment formatting
ValidIBInspectableRule formatting
fix typo in OverriddenSuperCallRule file name
# Conflicts:
# Source/SwiftLintFramework/Rules/ValidIBInspectableRule.swift
2016-11-30 17:14:40 +09:00
Norio Nomura
397b3ad8fc
Merge commit '1151c1883100fc2c65450a9266a06e0c9a4c83b3' into swift3.0
...
* commit '1151c1883100fc2c65450a9266a06e0c9a4c83b3':
Updating changelog
Rewriting rule to deal with nested structures
Add ImplicitGetterRule
2016-11-30 14:14:24 +09:00
Norio Nomura
ee638ef428
Merge commit '20870e7ab140e39dbe426feb322e8b02c7cfc993' into swift3.0
...
* commit '20870e7ab140e39dbe426feb322e8b02c7cfc993':
fix single file usage: `swiftlint lint --path File.swift`
# Conflicts:
# Source/SwiftLintFramework/Extensions/NSFileManager+SwiftLint.swift
# Source/SwiftLintFramework/Models/Configuration.swift
# Tests/SwiftLintFrameworkTests/ConfigurationTests.swift
2016-11-30 14:04:45 +09:00
Norio Nomura
abecb87672
Merge commit 'aa520f35481c7a83f9c94f217d48919bd37432fa' into swift3.0
...
* commit 'aa520f35481c7a83f9c94f217d48919bd37432fa':
make minor changes to tests for ACL or reusing existing constants
# Conflicts:
# Tests/SwiftLintFrameworkTests/TestHelpers.swift
2016-11-30 13:01:00 +09:00
Norio Nomura
aaf008c527
Merge commit '8f140ffdfe13c4f17398aa2d1256e2ed95bfdfe6' into swift3.0
...
* commit '8f140ffdfe13c4f17398aa2d1256e2ed95bfdfe6':
improve debugging failing tests due to mismatched violation locations
fix MarkRule edge cases
# Conflicts:
# Source/SwiftLintFramework/Rules/MarkRule.swift
2016-11-30 12:54:47 +09:00
Norio Nomura
121d19b941
Support Swift Package Manager on macOS
2016-11-08 20:35:30 +09:00