Commit Graph

2794 Commits

Author SHA1 Message Date
Ben Fox 1f44d56357 add configuration for missing_docs (#3701)
* `excludes_extensions` defaults to `true` to skip reporting violations
  for extensions with missing documentation comments.
* `excludes_inherited_types` defaults to `true` to skip reporting
  violations for inherited declarations, like subclass overrides.
2021-09-01 21:42:47 +00:00
Kane Cheshire 55b62cccb3 Updated file name to match type 2021-08-24 00:19:35 -07:00
Kane Cheshire 4a293632c2 Named rule correctly for Sourcery to work properly 2021-08-24 00:19:35 -07:00
Marcelo Fabri 50b6992852 Fix issues with explicit_type_interface on Swift 5.4
Fixes #3615
2021-08-16 02:23:28 -07:00
Marcelo Fabri cc79edd4af Fix issues in ImplicitReturnRule 2021-08-16 02:23:28 -07:00
Marcelo Fabri 9e3f0a8ff8 Fix some rules when using Swift 5.4 2021-08-16 02:23:28 -07:00
iressler 9aff1e0a8e This change addresses a false negative case in the RedundantOptionalInitializationRule. (#3671) 2021-08-16 02:01:17 -07:00
Ikko Ashimine 81eb0d9b1f Fix typo in ClosureSpacingRule.swift (#3669)
occurences -> occurrences
2021-07-06 10:41:59 -07:00
Marcelo Fabri 9939c536d5 Add anonymous_argument_in_multiline_closure opt-in rule (#3659)
* Add anonymous_argument_in_multiline_closure opt-in rule

* Restrict match to the closure

* Fixes
2021-06-17 17:03:19 -07:00
Steven Grosmark 300bf77967 Improve file_length warnings when excluding comments (#3654)
* Improve `file_length` warnings when excluding comments

* Update changelog

* Update Source/SwiftLintFramework/Rules/Metrics/FileLengthRule.swift

Co-authored-by: Yegor Chsherbatykh <ego1309@yandex.ru>

Co-authored-by: Steven Grosmark <steven.grosmark@ww.com>
Co-authored-by: Yegor Chsherbatykh <ego1309@yandex.ru>
2021-06-17 11:11:17 -07:00
Kane Cheshire 6367ff20c8 Updated triggering examples to indicate where the violation should occur 2021-05-24 12:05:29 -07:00
Kane Cheshire 50169fb556 Removed unused import causing CI to fail 2021-05-24 12:05:29 -07:00
Kane Cheshire 9c5d3b3c6f Tidy up 2021-05-24 12:05:29 -07:00
Kane Cheshire 3536a86ba1 Added more non-triggering examples 2021-05-24 12:05:29 -07:00
Kane Cheshire 91b125b001 Ran sourcery + tidied up 2021-05-24 12:05:29 -07:00
Kane Cheshire d6223893ed Moved description back 2021-05-24 12:05:29 -07:00
Kane Cheshire d7aeea39d9 Adding examples/tests 2021-05-24 12:05:29 -07:00
Kane Cheshire 0dd96d249e Uses correct enumcase instead of enum 2021-05-24 12:05:29 -07:00
Kane Cheshire 538764278b Adding new DisallowNoneCase rule 2021-05-24 12:05:29 -07:00
p-x9 050a10bbd9 Add Test 2021-05-21 14:33:16 -07:00
p-x9 80ca9a7e37 Fix Space appending process when multi byte offsets. 2021-05-21 14:33:16 -07:00
p-x9 7ea514b77a Fixed error in character limit per line. 2021-05-21 14:33:16 -07:00
p-x9 f0c707f477 Fix indents 2021-05-21 14:33:16 -07:00
p-x9 04a41bdb2f Fix Autocorrect on no space between the tuple and "in" in unneeded_parentheses_in_closure_argument 2021-05-21 14:33:16 -07:00
raduciobanu002 07c8e52fc8 "Colon Spacing" rule name update (#3583)
* * Changed rule name from "Colon" to "Colon Spacing"
* Updated tests

* Update CHANGELOG.md

Co-authored-by: Seth Friedman <sethfri@gmail.com>
2021-05-20 23:46:54 -04:00
Steven 625cd180ae Fix type_contents_order initializer detection (#3622) 2021-05-10 09:56:21 -04:00
Dan Loman dd672b4b0c [bug fix] expiring todo regex (#3597)
* Add failing tests

* Fix regex to allow non-zero-padded dates

* Update changelog

* Update CHANGELOG.md
2021-05-02 17:12:52 -04:00
Marcelo Fabri 4e3c87e2f3 Fix false positive in empty_enum_arguments (#3616)
Fixes #3562
2021-04-28 20:25:05 -07:00
Marcelo Fabri a10158c475 Add duplicated_key_in_dictionary_literal rule (#3613) 2021-04-28 17:25:08 -07:00
Dylan Maryk 5a3844401b Fix missing comma in description (#3588) 2021-04-27 22:51:37 -07:00
Keith Smiley 7976b74615 Add test functions with parameters to TestCaseAccessibilityRule (#3612)
If a function starts with `test` but takes some parameters, it is not
actually a test.
2021-04-26 20:04:04 +00:00
JP Simard 4039eff984 Release 0.43.1 2021-03-15 13:13:51 -04:00
Stephen Williams c1b77f8e0a Rename the “File Line Length” rule to just “File Length” 2021-03-08 09:29:51 -05:00
JP Simard da2ca76953 release 0.43.0 2021-03-03 16:01:42 -05:00
JP Simard e47fb60c7a Regenerate Sourcery output 2021-03-03 15:41:50 -05:00
JP Simard 92061e84b5 Merge pull request #3550 from realm/fix-oss-check-noise
Fix OSSCheck noise
2021-03-03 15:10:40 -05:00
JP Simard 027f130e8c fixup! Fix OSSCheck noise 2021-03-03 11:36:09 -05:00
JP Simard 7f7fc03a8f Fix OSSCheck noise
Try a few things:

1. Sort InclusiveLanguageRule terms since they're a Set and don't have
  deteministic ordering (will definitely help)
2. Fetch remote at the beginning of the script (likely to help)
3. Only fetch remote once (likely to help)
4. Sort branch & master output before diffing (unlikely to help)
5. Change diff filter from `d` to `AMRCU` (no idea if it will help)
2021-03-03 11:19:41 -05:00
László Kustra 87d4accb39 Add "Capture non-constant variable" rule 2021-03-02 16:11:33 -05:00
JP Simard 0a0fb1e71b File false negatives in unused_declaration
When a declaration refers to an Objective-C type but doesn't have an
explicit `@objc` attribute.

It would have the string `@objc` embedded in its USR. So add a space so
we only trigger this condition when there's an explicit `@objc`
attribute in the declaration source code.

The triggering example added here didn't trigger before this change.
2021-03-02 11:36:06 -05:00
Otavio Cordeiro 24122e1325 Rename Rule to BalancedXCTestLifecycleRule 2021-03-01 01:29:16 +01:00
Otavio Cordeiro a6a5e633d0 Add support to unbalanced teardown methods 2021-03-01 01:18:30 +01:00
Otavio Cordeiro 3fbc482a2e Add MARKs
to trigger a new build.
2021-02-28 23:48:06 +01:00
Otavio Cordeiro cdd877c289 Add examples for static setUp and tearDown 2021-02-28 23:48:06 +01:00
Otavio Cordeiro bd4dcd5b23 Add required_xctest_tearddown opt-in rule 2021-02-28 23:48:05 +01:00
JP Simard 3e04acd97d Revert "Revert "Fix issue that prevented the inclusion of a configuration file from a parent folder (#3491)""
This reverts commit b66f7c7992.
2021-02-26 11:44:10 -05:00
JP Simard 5b1d737683 Merge pull request #3538 from realm/feature/fix-custom-rules-merging
Multiple fixes for custom rules
2021-02-25 16:14:50 -05:00
JP Simard 721b077608 Add SWIFTLINT_LOG_MODULE_USAGE environment variable for UnusedImportRule
That's because it can currently be difficult to know why a module is
referenced in a file.

To use, run SwiftLint with the environment variable set to the module
whose references you want to log to `stderr`:

    SWIFTLINT_LOG_MODULE_USAGE=MyModule swiftlint analyze ...
2021-02-25 14:53:07 -05:00
JP Simard b66f7c7992 Revert "Fix issue that prevented the inclusion of a configuration file from a parent folder (#3491)"
This reverts commit 2f6fd1e95f.
2021-02-25 14:49:10 -05:00
Frederick Pietschmann 235f598ac7 Fix custom rules bug when using only_rules mode 2021-02-25 19:22:57 +01:00