Commit Graph

2276 Commits

Author SHA1 Message Date
Marcelo Fabri 8a686dac2a Merge pull request #2310 from Dschee/file-name
Add options `prefix_pattern` and `suffix_pattern` to `file_name` rule
2018-07-24 09:46:28 -07:00
Cihat Gündüz f2540cc53d Combine nested if-lets to single if-let 2018-07-24 17:37:37 +02:00
Cihat Gündüz bacc3ddaca Add default suffixPattern value directly in configuration initalizer 2018-07-24 17:34:17 +02:00
Cihat Gündüz 1c70667831 Remove hard-coded suffix style 2018-07-24 16:46:56 +02:00
Marcelo Fabri e9c6d6aef6 Merge pull request #2308 from Dschee/conditional-returns-on-newline
Add `if_only` option to rule conditional_returns_on_newline
2018-07-24 07:45:01 -07:00
Cihat Gündüz e3278ff8e5 Update Changelog + Fix lint issue 2018-07-24 16:38:45 +02:00
Cihat Gündüz c02dd17155 Add prefix_pattern and suffix_pattern options to file_name rule 2018-07-24 16:35:38 +02:00
Cihat Gündüz 1452da4129 Remove explicit types after feedback from @marcelofabri 2018-07-24 13:03:54 +02:00
Cihat Gündüz dc44fbcac3 Add tests for if_only configuration option 2018-07-24 13:02:30 +02:00
Ben Asher 32e8c5bbc3 Fix extra array copies 2018-07-23 10:13:55 -07:00
Ben Asher 7f86dc4c44 Fix paths arg eating other params 2018-07-23 10:13:55 -07:00
Ben Asher 3f1acd6ca1 Prefer single path, if it's provided; fix multi-path 2018-07-23 10:13:55 -07:00
Ben Asher 7a32b8d4c2 Support for multiple paths 2018-07-23 10:13:55 -07:00
Cihat Gündüz 94c14c73bc Add exception for types ending with Extension 2018-07-23 11:47:52 +02:00
Cihat Gündüz 51a9a62159 Add if_only option to rule conditional_returns_on_newline 2018-07-23 10:22:28 +02:00
Marcelo Fabri f2d14e7c5a redundant_optional_initialization rule now lints local variables
Fixes #2233
2018-07-21 21:35:24 -07:00
Marcelo Fabri 6937f35ae4 Fix false positive on attributes rule
Fixes #2297
2018-07-21 18:18:25 -07:00
Marcelo Fabri 883a8dd0dd Merge pull request #2274 from marcelofabri/automatic-rule-tests
Split RulesTests into several test cases, generating them automatically
2018-07-21 18:13:55 -07:00
Marcelo Fabri 37fe0f82d8 Add tests for RedundantTypeAnnotationRule 2018-07-21 17:39:29 -07:00
Marcelo Fabri 8aadb802fb Split RulesTests into several test cases, generating them automatically 2018-07-21 17:23:08 -07:00
Norio Nomura 093b99bea7 Fix LinterCacheTests.testDetectSwiftVersion for Swift 4.2 2018-07-20 08:30:25 +09:00
Marcelo Fabri 90a2134a18 Merge pull request #2239 from sjavora/master
Opt-in rule to check for redundant type annotations
2018-07-19 08:24:51 -07:00
Marcelo Fabri 84abd41a1a Merge pull request #2285 from ornithocoder/anyobject
Add opt-in anyobject_protocol rule
2018-07-19 08:19:42 -07:00
Ornithologist Coder 95fb5ab759 Change minimum Swift compiler version to 4.1
Because it doesn't work on Swift 4.0 for Linux.
2018-07-11 08:39:48 +02:00
Ornithologist Coder b6698c0da4 Fix Linux build 2018-07-11 08:39:48 +02:00
Ornithologist Coder 0730da975f Revert "Use regular expression instead of AST to find 'class' conformance"
Using regular expression instead of AST to find 'class' conformance
didn't work on the Linux. Reverting the commit since it had no effect on
the final result.

This reverts commit fce9f599a7f5c77afe0ac3a4254cd6909410f0ab.
2018-07-11 08:39:47 +02:00
Ornithologist Coder 62ab36b883 Use regular expression instead of AST to find 'class' conformance 2018-07-11 08:39:47 +02:00
Ornithologist Coder c5dd67e433 Make anyobject_protocol opt-in 2018-07-11 08:39:41 +02:00
Daniel Metzing 8d7ac963bc Append failure reason to description 2018-07-09 21:06:15 +02:00
Ornithologist Coder 9f3cb13389 Add @objc example 2018-07-08 09:50:52 +02:00
Ornithologist Coder e8d3d1c08e Make anyobject_protocol correctable 2018-07-07 21:15:57 +02:00
Ornithologist Coder 2161515d36 Set minimum Swift compiler version to 4 2018-07-07 19:22:10 +02:00
Ornithologist Coder ec06fe6e82 Change the place where the violation is triggered 2018-07-07 19:01:55 +02:00
Ornithologist Coder 01dc00f576 Add default rule anyobject_protocol
This commit implements #2283.
2018-07-07 18:54:09 +02:00
Marcelo Fabri 1c8d5a49a8 Merge pull request #2257 from marcelofabri/format-dont-touch
Don’t overwrite file when formatting if not needed
2018-06-24 13:31:01 -07:00
Marcelo Fabri 8c5f81f3be Merge pull request #2264 from marcelofabri/closure-rules-swift-4.2
Fix closure-related rules when using Swift 4.2
2018-06-24 11:46:41 -07:00
Marcelo Fabri 701abbea94 Don’t overwrite file when formatting if not needed
Fixes #2249
2018-06-24 11:38:38 -07:00
Frederick Pietschmann 9cbf16de61 Decrease SuperfluousDisableCommand severity 2018-06-24 11:25:22 -07:00
Marcelo Fabri 12305a8227 Fix closure-related rules when using Swift 4.2 2018-06-24 11:18:31 -07:00
Marcelo Fabri b773b30c30 Fix quick_discouraged_call rule when using Swift 4.2 2018-06-24 03:04:53 -07:00
Marcelo Fabri d6175027f4 Fix required_enum_case rule when linting with Swift 4.2 2018-06-24 02:37:53 -07:00
Marcelo Fabri fb0241ecb1 Fix implicit_return when linting with Swift 4.2 2018-06-24 02:05:45 -07:00
Marcelo Fabri b168296d07 Fix generic_type_rule when using Swift 4.2 2018-06-24 00:20:50 -07:00
Marcelo Fabri 82f3362d78 Fix identifier_name rule when using Swift 4.2
Fixes #2231
2018-06-23 22:49:06 -07:00
Marcelo Fabri 80421adbd4 Fix explicit_enum_raw_value rule with Swift 4.2 2018-06-23 22:20:44 -07:00
Allen Wu abe3dd01c5 Fix ControlStatement rule failing to apply when clauses contain commas 2018-06-23 15:15:36 -07:00
JP Simard 8c5d2afa7c release 0.26.0 2018-06-22 09:48:20 -07:00
Marcelo Fabri 1d28025789 Add convenience_type opt-in rule
Fixes #1871
2018-06-16 21:08:49 -07:00
Anders Hasselqvist 1efb78ef25 Fix unnecessary oss-check diff reports
Other minor improvements based on review feedback.
2018-06-14 00:48:14 +09:00
Anders Hasselqvist 2fee6db032 Support file placeholder with required/forbidden_string 2018-06-13 20:05:02 +09:00