Commit Graph

2256 Commits

Author SHA1 Message Date
Marcelo Fabri 8aadb802fb Split RulesTests into several test cases, generating them automatically 2018-07-21 17:23:08 -07: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
Anders Hasselqvist 58202772d3 Support placeholder for forbidden_pattern
- Move regex creation for *_pattern to FileHeaderConfiguration
- Switch to using test fixures for the tests
2018-06-13 19:55:27 +09:00
Anders Hasselqvist 15af1a778f Add file name matching to file_header rule
Add support of inserting a SWIFTLINT_CURRENT_FILENAME placeholder in the required_pattern.
The placeholder will be replaced by the lastPathComponent of the file's path.
2018-06-13 19:55:27 +09:00
Austin Belknap 723a1f9004 Find the correct case colon. 2018-06-11 09:30:19 -07:00
Austin Belknap d2981d779f Fix XCode build issues. 2018-06-11 09:30:19 -07:00
Austin Belknap ac6ab37370 Switch from regex-based rule to AST. 2018-06-11 09:30:19 -07:00
Austin Belknap 55a7a08ed2 Fix file name. 2018-06-11 09:30:19 -07:00
Austin Belknap 1fdc5fda94 Add "No Fallthrough Only" Rule. 2018-06-11 09:30:19 -07:00
Eric Horacek b85df7fa22 Raw value 2018-06-10 21:34:42 -07:00
Eric Horacek a9c2f854c3 Address comments 2018-06-10 21:27:03 -07:00
Eric Horacek f481aa4ac9 Add explanatory comment 2018-06-10 19:49:03 -07:00
Eric Horacek 3778ad35de Fix non-function call false positive 2018-06-10 19:49:03 -07:00
Eric Horacek 56827ac0f3 Fix crashes 2018-06-10 19:49:03 -07:00
Eric Horacek 80dad5975b Add more explicit types 2018-06-10 19:49:03 -07:00
Eric Horacek 7b8c97ad02 Add multiline function chain rule
See #2214
2018-06-10 19:49:03 -07:00
Šimon Javora 96c1422f23 Added a rule to check for redundant type annotations. 2018-06-10 11:28:33 +02:00
Marcelo Fabri 6e987a763e Fix a false positive in unused_closure_parameter rule
Fixes #2062
2018-06-02 20:56:24 -07:00
Daniel Metzing 5c0e7c8c40 Update catch rule correction to avoid compilation issues 2018-05-31 14:27:22 +10:00
JP Simard fffd9fd45b Remove explicit Range initializers
these don't compile with Swift trunk and don't appear to be necessary.
2018-05-31 09:25:16 +10:00
JP Simard e2b74bd867 Require Swift 4.0 or higher to build. 2018-05-30 14:00:17 +10:00
JP Simard 2f287ef3e7 Merge pull request #2208 from erichoracek/eh--mark-autocorrection-improvements
Improve mark rule autocorrection
2018-05-30 13:46:34 +10:00