Commit Graph

4176 Commits

Author SHA1 Message Date
Joshua Kaplan 6cf052d0d8 Add tests 2018-09-27 00:22:41 +09:00
Joshua Kaplan 71b6def313 Add random rule 2018-09-27 00:21:36 +09:00
Marcelo Fabri bf85625ed8 Merge pull request #2396 from marcelofabri/static_operator
Add static_operator opt-in rule
2018-09-14 10:44:28 -07:00
JP Simard 60f98ec50d Update dependencies (#2402) 2018-09-13 13:42:34 -07:00
Marcelo Fabri 80e081d23e Merge pull request #2399 from marcelofabri/enable-collection_alignment
Enable collection_alignment on SwiftLint
2018-09-12 15:52:01 -07:00
Marcelo Fabri 14ade06392 Merge pull request #2400 from niilohlin/master
Update README with xcodebuild example.
2018-09-12 09:02:16 -07:00
Niil 15761dd097 Update README with xcodebuild example. 2018-09-12 13:43:17 +02:00
Marcelo Fabri b92b236a5e Add static_operator opt-in rule
Fixes #2395
2018-09-11 09:34:10 -07:00
Marcelo Fabri dfb447490e Enable collection_alignment on SwiftLint 2018-09-11 09:31:54 -07:00
Marcelo Fabri 8610f83c1b Merge pull request #2392 from daltonclaybrook/collection-alignment
New Rule - Collection Element Alignment
2018-09-11 09:23:04 -07:00
Dalton Claybrook c0a52bb22d Fix formatting issue in Changelog 2018-09-10 23:51:09 -04:00
Dalton Claybrook b20424426c Add updates based on PR feedback 2018-09-10 23:45:56 -04:00
Dalton Claybrook 9f74749473 Add shared non-triggering examples to the tests 2018-09-10 23:45:56 -04:00
Dalton Claybrook 74f7c1481d Update collection alignment rule name 2018-09-10 23:45:56 -04:00
Dalton Claybrook dfa92dc07d Add bridge to NSString to fix linux issue 2018-09-10 23:45:56 -04:00
Dalton Claybrook 3b1fd5e857 Add collection alignment tests to the correct target and update rules 2018-09-10 23:45:56 -04:00
Dalton Claybrook 11f2b2b5c3 Update changelog with collection alignment rule 2018-09-10 23:45:56 -04:00
Dalton Claybrook 81746c6507 Make collection alignment rule opt-in 2018-09-10 23:45:56 -04:00
Dalton Claybrook 4e27bf9f87 Collection alignment rule is no longer an automatic testable 2018-09-10 23:45:56 -04:00
Dalton Claybrook a71bb4dd48 Add more triggering and non-triggering examples 2018-09-10 23:45:56 -04:00
Dalton Claybrook 0597df5b8c Add support for colon alignment 2018-09-10 23:45:56 -04:00
Dalton Claybrook 31995f916f Clean up collection alignment rule to mimic other alignment rules 2018-09-10 23:45:56 -04:00
Dalton Claybrook d8a043f84b Create CollectionAlignmentConfiguration 2018-09-10 23:45:56 -04:00
Dalton Claybrook 45b0881f1d Add Collection Alignment rule and implement basic left-alignment case 2018-09-10 23:45:56 -04:00
Marcelo Fabri 00b559b20a Fix test 2018-09-09 20:53:20 -07:00
Marcelo Fabri c9f315a798 Merge pull request #2372 from marcelofabri/identical_operands
Add identical_operands opt-in rule
2018-09-09 20:47:49 -07:00
JP Simard 8fd15b0b21 Link to #2248 from changelog 2018-09-10 05:32:54 +02:00
JP Simard 944ca8806a Link to #321 from changelog 2018-09-10 05:14:47 +02:00
Marcelo Fabri ad55906e4c Merge pull request #2394 from marcelofabri/enable-more-rules
Enable some opt-in rules
2018-09-08 21:15:47 -07:00
Marcelo Fabri b089769a40 Enable some opt-in rules 2018-09-08 20:25:45 -07:00
Marcelo Fabri 1415fe57b8 Remove explicit line_length configuration
120 has been the default value for a while.
2018-09-08 20:25:29 -07:00
Marcelo Fabri d45e2df736 Fix regex on .swiftlint.yml 2018-09-08 20:24:42 -07:00
Marcelo Fabri f6ec91cd1e Delete ISSUE_TEMPLATE.md
Removing it in favor of more specific templates.
2018-09-08 20:10:33 -07:00
Marcelo Fabri 985d85a6f9 Update issue templates 2018-09-08 20:09:07 -07:00
JP Simard 612177949b Run unused_private_declaration on SwiftLint on CI (#2390) 2018-09-05 22:41:45 -07:00
JP Simard 53d8a3aba9 Add UnusedPrivateDeclarationRule (#2385)
* Add UnusedPrivateDeclarationRule

* Temporarily disable UnusedPrivateDeclarationRule tests on Xcode 10

So we can merge UnusedPrivateDeclarationRule without having to wait
for CircleCI to update its Xcode 10 version.
2018-09-05 21:59:45 -07:00
JP Simard 6cea034355 Analyze SwiftLint on CI (#2387)
* Enable analyzer_rules in .swiftlint.yml

* Add analyze and analyze_autocorrect commands to Makefile

* Run `swiftlint analyze` on CI

* Run make bootstrap before make analyze
2018-09-04 08:55:07 -07:00
JP Simard 8d734366fb Remove unused private declarations (#2386) 2018-09-03 16:45:02 -07:00
Marcelo Fabri fad73d36f4 Use File.syntaxMap instead of making a request (#2384) 2018-09-03 10:39:11 -07:00
JP Simard e460c5ef9c Add Unused Import analyzer rule (#2381) 2018-09-02 14:45:02 -07:00
Ornithologist Coder 371e7b4995 Run format before autocorrect (#2383) 2018-09-02 14:35:39 -07:00
JP Simard dcc85fb0f3 Remove unused imports (#2382) 2018-09-02 14:09:04 -07:00
JP Simard 2bcea4b04d Add ability for SwiftLint to lint files with full type-checked AST awareness (#2379)
* Add LintableFilesVisitor

* Move LintCommand logic into LintOrAnalyzeCommand

to prepare for the upcoming analyze command

* Add AnalyzeCommand (not fully implemented yet in SwiftLintFramework)

* Add analyzerRules configuration member

* Add AnalyzerRule protocol

* Pass compiler arguments to validate/correct

* Add requiresFileOnDisk member to RuleDescription

This will be used by AnalyzerRules because they need a file on disk
to pass in the compiler arguments to SourceKit.

* Exclusively run AnalyzerRules when the Linter has compiler arguments

* Enable testing AnalyzerRules in TestHelpers

* Add ExplicitSelfRule

* Update documentation

* Fix `analyze --autocorrect`

* Improve performance of CompilerArgumentsExtractor

* Fix lint command actually running analyze

* Move File operations in TestHelpers into a private extension

* Add analyzer column to rules command and markdown documentation

* Use a Set literal

* Make AnalyzerRule inherit from OptInRule

* Mention analyzer_rules in readme

* Mention that analyzer rules are slow
2018-09-02 00:13:27 -07:00
JP Simard 616554975e Test Swift 4.2 on Linux on CI 2018-09-01 14:03:26 -07:00
JP Simard 6799b06f1b Refactor TestHelpers (#2378) 2018-09-01 13:52:02 -07:00
JP Simard b38758b902 Completely remove deprecated --use-tabs option (#2376) 2018-09-01 12:50:31 -07:00
JP Simard e33caca50f Update 'help' output in README (#2377) 2018-09-01 12:50:13 -07:00
JP Simard 75ba96b2ad Fix testEmojiReporter on Linux with Swift 4.2 (#2375) 2018-09-01 12:44:52 -07:00
JP Simard 687c6a7549 Fix make sourcery
* Invoke correct make job for `AutomaticRuleTests`
* Generate `LinuxMain` last so that it can include tests from
  AutomaticRuleTests
2018-08-31 15:38:46 -07:00
Marcelo Fabri be60504dad Enable identical_operands rule on the project 2018-08-30 23:12:44 -07:00