Commit Graph

1528 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
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
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 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
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
Frederick Pietschmann 9cbf16de61 Decrease SuperfluousDisableCommand severity 2018-06-24 11:25:22 -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
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 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