Commit Graph

1125 Commits

Author SHA1 Message Date
Josh Friend a4d32cfa67 Don't trigger ClosingBraceRule across line breaks
Closes #592
2016-04-05 14:11:10 -04:00
JP Simard b2c4be5241 Merge pull request #599 from realm/nn-use-configuration-on-make-clean
Add `-configuration` options to `clean` target in `Makefile`
2016-03-29 20:59:38 -07:00
Norio Nomura 5c0045e29a Add -configuration options to clean target in Makefile
`xcodebuild clean` uses `Debug` configuration without `-configuration`
option, and cleans directories that used by `Debug` configuration. But
`make install` uses `-configuration Release` by scheme of project.

By this change, `clean` cleans all directories that used by `Debug`,
`Release` and `Test` configurations.
2016-03-30 12:32:47 +09:00
JP Simard 3f350ec7ad Merge pull request #555 from realm/nn-use-xcode-select-p-dlsym
Update SourceKitten, SwiftyTextTable and support `swift test`
2016-03-29 17:49:23 -07:00
JP Simard ec08474843 update screenshot 2016-03-29 13:21:07 -07:00
Norio Nomura d23cf7157b Add changelog entry 2016-03-25 10:19:12 +09:00
Norio Nomura 46ba7cb181 [SPM] Disable make spm_test on Travis-CI until SR-989 will be fixed
https://bugs.swift.org/browse/SR-989
2016-03-25 10:18:21 +09:00
Norio Nomura ff29a2c9a2 [SPM] Remove obsoleted XCTestCaseProvider.allTests
https://github.com/apple/swift-corelibs-xctest/blob/master/README.md#additional-considerations-for-swift-on-linux
2016-03-19 10:14:29 +09:00
Norio Nomura 0408f1f58f Add Tests to include in .swiftlint.yml 2016-03-19 10:11:57 +09:00
Norio Nomura 55fce2c108 [SPM] Update Makefile to using swift test 2016-03-19 10:05:18 +09:00
Norio Nomura 0a6faafee7 Update SwiftyTextTable to 0.3.0 2016-03-19 10:05:18 +09:00
Norio Nomura 070bbb87dd [SPM] Update Package.swift 2016-03-19 10:05:18 +09:00
Norio Nomura 5caeb07342 [SPM] Move Source/SwiftLintFrameworkTests to Tests/SwiftLintFramework 2016-03-19 10:05:17 +09:00
Norio Nomura fa78d39ff8 [SPM] Update SourceKitten to 0.11.0 2016-03-19 09:31:19 +09:00
Norio Nomura 6dbef0b055 Cleanup FRAMEWORK_SEARCH_PATHS and LIBRARY_SEARCH_PATHS 2016-03-19 09:31:19 +09:00
Norio Nomura ee44cedadf [SPM] Update to swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a 2016-03-19 09:31:18 +09:00
Norio Nomura cf15800474 [SPM] Remove spm_bootstrap and spm_teardown from Makefile 2016-03-19 09:31:18 +09:00
Norio Nomura c1ee9f4939 Remove linking libclang.dylib and sourcekitd.framework 2016-03-19 09:31:18 +09:00
Norio Nomura 90be48ebb7 Update SourceKitten to 0.11.0 2016-03-19 09:31:18 +09:00
JP Simard 6cafa08e70 release 0.9.2: Multiple Exhaust Codes 0.9.2 2016-03-15 15:29:14 -07:00
JP Simard e23516274f Merge pull request #567 from eaigner/master
Accept variable names starting with more than one capital letter
2016-03-14 17:36:25 -07:00
JP Simard 5fdb7be5eb Merge pull request #585 from realm/nn-fix-printing-duplicated-violations
Fix printing duplicated violations bug that introduced by #584
2016-03-14 16:52:34 -07:00
Erik Aigner 2c5b7a61d6 Accept variable names starting with more than one capital letter
The rule was modified to allow for names that start with multiple uppercase letters like XMLString or MIMEType.

Closes #566
2016-03-13 12:08:32 +01:00
Norio Nomura 76b083894f Fix printing duplicated violations bug that introduced by #584 2016-03-13 13:14:10 +09:00
JP Simard ee77861eca Merge pull request #584 from realm/jp-multiple-exit-codes
use multiple exit codes to distinguish between errors & strict warnings
2016-03-09 20:59:23 -08:00
JP Simard 1967175729 add changelog entry 2016-03-09 20:58:57 -08:00
JP Simard 681e993f08 break up LinterCommand's violation reporting
otherwise we get a function length exceeded violation
2016-03-09 20:46:04 -08:00
JP Simard d0590055b3 use multiple exit codes to distinguish between errors & strict warnings
Addresses #166.
2016-03-09 20:00:33 -08:00
JP Simard 0979aa3b64 Merge pull request #552 from realm/nn-rewrite-force-unwrapping-rule
Rewrite `ForceUnwrappingRule`
2016-03-09 19:53:44 -08:00
JP Simard 1166b697c2 fix docs typos 2016-03-09 19:43:52 -08:00
JP Simard 11324f7de2 add trailing spaces to changelog for #575 2016-03-08 12:16:52 +09:00
JP Simard 6b8b1d8a5d Merge pull request #575 from bitwink/master
Do not overwrite files whose contents have not changed
2016-03-08 12:16:03 +09:00
Neil Gall 791d67bf0b Add CHANGELOG entry 2016-03-03 12:54:19 +00:00
Neil Gall 1b4cf0c574 Do not overwrite files whose contents have not changed 2016-03-02 14:23:33 +00:00
Norio Nomura 5781879c52 Add changelog entry 2016-02-21 22:43:59 +09:00
Norio Nomura f62fe10372 Rewrite ForceUnwrappingRule
Add capture previous of "!" for:
- checking whether SyntaxKinds is comment, string, keyword or type identifier
- checking whether character is ")"
- checking whether SyntaxKinds is identifier or not
- SwiftDeclarationKind is one of some "Var*" and declaration containing "="

Add capture next of "!" for:
- checking SyntaxKinds is identifier

By applying this, the duration of linting Carthage 0.14 increase from 300ms to 380ms.
2016-02-21 22:35:56 +09:00
Norio Nomura c042258ac3 Add Structure.kindsFor(_:)
That returns array of tupple containing "key.kind" and "byteRange" from Structure that containing the byte offset.
2016-02-21 22:35:56 +09:00
Norio Nomura d5e37987df Change XCTestCase.verifyRule to show detail of non-triggering examples on failing test 2016-02-21 22:35:56 +09:00
Norio Nomura f80373f43d Add failing false positive examples to ForceUnwrappingRule's description
#546, #547
2016-02-21 22:35:56 +09:00
JP Simard 0de9155ae5 Merge pull request #542 from realm/nn-fix-466
Fix `CommaRule` mismatch between violations and corrections
2016-02-20 14:00:28 -08:00
JP Simard f26a9d51cb move changelog entry 2016-02-20 10:54:25 -08:00
Norio Nomura 7c2c4ac270 Apply workaround for false positive of valid_docs
```
 SwiftLintFrameworkTests.IntegrationTests
  testSwiftLintLints, failed - Documented declarations should be valid.
```
That has been fixed on locally by https://github.com/jpsim/SourceKitten/pull/175
2016-02-19 18:17:20 +09:00
Norio Nomura 67be11ac92 Improve performance of SyntaxMap.tokensIn(_:)
On linting Carthage 0.14, the duration of `SyntaxMap.tokensIn(_:)` reduced from 145ms to 51ms.
2016-02-19 17:55:44 +09:00
Norio Nomura 704e7bde1d Add SyntaxMap.tokensIn(_:)
That returns array of SyntaxTokens intersecting with byte range.
2016-02-19 17:30:54 +09:00
Norio Nomura 01b06164e3 Apply corrections made by refined CommaRule on running IntegrationTests.testSwiftLintAutoCorrects() 2016-02-17 11:15:41 +09:00
Norio Nomura 32b98baf4c Exclude new line characters from trailing whitespace 2016-02-17 11:15:41 +09:00
Norio Nomura ecbfb46398 Add failing non trigger example
```swift
func abc(
  a: String,
  bcd: String
) {
}
```
2016-02-17 11:15:41 +09:00
Norio Nomura 6f17c93bd6 Add check trailing comment 2016-02-17 11:15:41 +09:00
Norio Nomura 78255e098b Add failing non trigger examples
```swift
func abc(
  a: String,  // comment
  bcd: String // comment
) {
}
```
2016-02-17 11:15:41 +09:00
Norio Nomura 8c35e1d3db Share regular expression between validateFile(_:) and correctFile(_:) in CommaRule 2016-02-17 11:15:41 +09:00