Commit Graph

499 Commits

Author SHA1 Message Date
Marcelo Fabri 88f4c8be6f Minor changes after merging #2318 2018-07-30 00:12:02 -07:00
Marcelo Fabri f7f3f3dee5 Merge pull request #2318 from mattremmel/nef10_missing_docs
Added back 'missing_docs' (Nef10)
2018-07-30 00:05:05 -07:00
Marcelo Fabri 6ea0a5c4a1 Merge pull request #2316 from realm/ks/exclude-glob
Add support for globs in excluded paths
2018-07-29 22:46:00 -07:00
Marcelo Fabri 0820cd2976 Merge pull request #2313 from Dschee/explicit-type-interface
Add option allow_redundancy to rule explicit_type_interface
2018-07-29 22:45:17 -07:00
Marcelo Fabri 744403cedb Merge pull request #2281 from maciesielka/feature/allow-first-closure-multiline-args
add "allow_first_closure_on_same_line" configuration to "multiline_arguments"
2018-07-29 22:41:12 -07:00
Michael Ciesielka 7efce91996 Rename “allow_first_closure_on_same_line” configuration for “multiline_arguments” rule to “only_enforce_after_first_closure_on_first_line” to increase clarity. 2018-07-28 15:28:34 -04:00
Cihat Gündüz b4f960bd48 Add config option allow_redundancy 2018-07-27 11:12:46 +02:00
Keith Smiley 97dc3b69e5 Rename function 2018-07-26 10:21:13 -07:00
Keith Smiley b21307530c Move glob to its own struct 2018-07-26 10:21:13 -07:00
Keith Smiley 63edaa9081 Move alias tests to new file 2018-07-26 10:21:13 -07:00
Keith Smiley a807d723e4 Add support for globs in excluded paths 2018-07-26 10:21:13 -07:00
Matthew Remmel 89adc4224c Patch created from Nef10 (https://github.com/Nef10/SwiftLint.git) missing_docs branch, to remove merge commits that were preventing merging the PR (https://github.com/realm/SwiftLint/pull/2172) 2018-07-25 11:34:53 -04:00
Keith Smiley 6eedf5d73c Add private_only to prefixed_toplevel_constant (#2315)
* Add private_only to prefixed_toplevel_constant

This allows users to opt in to only validate top level constants have
the given prefix if the constant is private or fileprivate.
2018-07-24 12:38:01 -07:00
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
Marcelo Fabri f3be82a41d Rename variable in tests 2018-07-24 09:43:42 -07:00
Cihat Gündüz 03c9e88f3d Add test cases for when both prefix_pattern and custom_pattern are given 2018-07-24 17:44:59 +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 dc44fbcac3 Add tests for if_only configuration option 2018-07-24 13:02:30 +02:00
Cihat Gündüz 961df5a615 Add test for new expected behavior 2018-07-23 11:33:11 +02: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 4eeac70445 Exclude generated file from file_name rule 2018-07-21 17:36:30 -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
Marcelo Fabri af588ee4be Add test to LinuxMain 2018-07-19 08:17:12 -07:00
Daniel Metzing 8d7ac963bc Append failure reason to description 2018-07-09 21:06:15 +02:00
Ornithologist Coder 01dc00f576 Add default rule anyobject_protocol
This commit implements #2283.
2018-07-07 18:54:09 +02:00
Mike Ciesielka 81ee9904b3 Add "allow_first_closure_on_same_line" configuration to "multiline_arguments" rule as proposed in #1896. add tests. 2018-07-05 11:44:16 -07:00
Marcelo Fabri 9201afbc66 Use parallelFlatMap in integration tests 2018-06-24 12:00:59 -07:00
Marcelo Fabri 1d28025789 Add convenience_type opt-in rule
Fixes #1871
2018-06-16 21:08:49 -07: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 1fdc5fda94 Add "No Fallthrough Only" Rule. 2018-06-11 09:30:19 -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
Norio Nomura 6bcabfe5f8 Detect swift-4.1.2 2018-05-13 21:39:57 +09:00
JP Simard 2819c89ec3 Fix force-try violation 2018-05-11 22:28:26 -07:00
JP Simard 84bfdca774 Enable File Name rule for SwiftLint & fix violations 2018-05-11 22:17:40 -07:00
JP Simard 24ec44d288 Add file_name opt-in rule
validating that file names contain the name of a
type or extension declared in the file (if any).
2018-05-11 22:17:39 -07:00
JP Simard 62a3b707fa Merge pull request #2185 from marcelofabri/default-params-end
Add function_default_parameter_at_end rule
2018-05-11 20:42:08 -07:00
JP Simard add9b53ea3 Merge branch 'master' into master 2018-05-11 10:11:27 -07:00
Marcelo Fabri 588bed83e6 Add function_default_parameter_at_end rule 2018-05-11 09:18:30 -07:00
Varun P M 794160a8d2 Added ignores_default_parameters when calculating parameter count 2018-05-10 17:40:30 +05:30
Ornithologist Coder 5eea1d10ba Add empty_xctest_method opt-in rule 2018-05-10 14:05:42 +02:00
freak4pc 35f388f04d Remove redundant test 2018-05-06 23:34:14 +03:00
freak4pc 62d0dd14ca Remove headers 2018-05-06 23:34:14 +03:00