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
Marcelo Fabri
588bed83e6
Add function_default_parameter_at_end rule
2018-05-11 09:18:30 -07:00
Ornithologist Coder
5eea1d10ba
Add empty_xctest_method opt-in rule
2018-05-10 14:05:42 +02:00
freak4pc
62d0dd14ca
Remove headers
2018-05-06 23:34:14 +03:00
freak4pc
8e0202cfc8
Added violation marker and fixed tests
2018-05-06 23:34:14 +03:00
JP Simard
22a6187553
Merge branch 'master' into attibute_and_modifier_order
...
* master:
Remove all file headers
Make fallthrough rule opt-in
Update the swift file and run the unit tests
Fix a typo
2018-05-05 15:25:43 -07:00
JP Simard
b83e0991b9
Remove all file headers
...
The MIT license doesn't require that all files be prepended with this
licensing or copyright information. Realm confirmed that they're ok with this
change. This will enable some companies to contribute to SwiftLint and the
date & authorship information will remain accessible via git source control.
2018-05-04 13:42:02 -07:00
Daniel Metzing
61259692ed
Removing s from rule name
2018-04-27 08:59:02 +02:00
Daniel Metzing
b2bb9d6c89
Merge remote-tracking branch 'upstream/master' into upstream_master
2018-04-26 15:10:14 +02:00
Daniel Metzing
5283598794
Merge remote-tracking branch 'upstream/master' into upstream_master
2018-04-25 12:43:06 +02:00
Marcelo Fabri
428379ce8f
Add unavailable_function
2018-04-24 09:29:53 -07:00
Daniel Metzing
1ec1fef998
Fixing project file after merge
2018-04-10 23:18:46 +02:00
Daniel Metzing
cf64c0873b
Merge branch 'attibute_and_modifier_order' into upstream_master
...
# Conflicts:
# Cartfile
# Cartfile.private
# Cartfile.resolved
# Carthage/Checkouts/SourceKitten
# Package.resolved
# Package.swift
# Rules.md
# Source/SwiftLintFramework/Extensions/Configuration+LintableFiles.swift
# Source/SwiftLintFramework/Extensions/Dictionary+SwiftLint.swift
# Source/SwiftLintFramework/Models/SwiftVersion.swift
# Source/SwiftLintFramework/Rules/ModifiersOrderRule.swift
# Source/SwiftLintFramework/Rules/RuleConfigurations/ModifiersOrderConfiguration.swift
# SwiftLint.xcodeproj/project.pbxproj
# Tests/SwiftLintFrameworkTests/LinterCacheTests.swift
# Tests/SwiftLintFrameworkTests/ModifiersOrderTests.swift
# circle.yml
2018-04-10 23:04:11 +02:00
Daniel Metzing
c68a28dba5
Adding rule
2018-04-10 22:52:16 +02:00
Marcelo Fabri
1a9a4f7516
Add redundant_set_access_control rule
...
Fixes #1869
2018-04-08 21:54:50 -07:00
JP Simard
ec7f643475
Run 'make sourcery'
2018-04-08 10:48:27 -07:00
Keith Smiley
925fb26d83
Add LowerACLThanBodyRule
...
This new rule validates that if a type/function/variable definition has
an ACL specifier, it is more restrictive than the containing body's
level. This is intended to lint a peculiarity of SE-0025 where it is
stated:
> The compiler should not warn when a broader level of access control is
used within a type with more restrictive access, such as internal within
a private type. This allows the designer of the type to select the
access they would use were they to make the type more widely accessible.
I think this is an anti-goal because when a type is made more open, it
should be a concious decision at that time to make it public. This is of
course an opt-in rule as well. This also has the added benefit of
linting this compiler bug: https://bugs.swift.org/browse/SR-2925
2018-04-04 10:16:12 -07:00
Ornithologist Coder
faee8c935b
Adds opt-in rule discouraged_optional_collection
2018-03-26 00:26:13 +02:00
Daniel Metzing
96d29817b4
Add untyped_error_in_catch opt-in rule
2018-03-17 12:54:51 -07:00
Davide Sibilio
5c8d6069b6
Implemented empty_string rule ( #2064 )
...
Added empty_string rule
2018-03-17 11:47:04 -07:00
J Cheyo Jimenez
55bd3beeff
modifierOrderRule added
...
```
opt_in_rules:
- modifiers_order
modifiers_order:
before_acl: ["override"]
after_acl: ["class"]
```
2018-03-05 22:01:46 +01:00
Marcelo Fabri
8c2c4b0a01
Fix false positive in empty_enum_arguments rule when using closures
...
Fixes #2041
2018-02-10 20:21:58 -08:00
Ornithologist Coder
f485be257d
Adds opt-in discouraged_optional_boolean rule
2018-01-22 00:44:23 +01:00
Ornithologist Coder
1295c5d182
Adds opt-in prefixed_toplevel_constant rule
...
Implements #1907 .
2018-01-05 04:07:10 +01:00
Ornithologist Coder
a3c6a7f40c
Adds opt-in discouraged_object_literal rule
...
Implements #1987 .
2018-01-03 23:00:54 -08:00
Donald Ritter
1deddf2334
Adds a new rule which allows for enums that conform to protocol to
...
require cases.
2017-12-22 13:08:51 -05:00
JP Simard
1541f519b2
Merge pull request #1966 from joseprl89/feature/explicit_acl_rule
...
Add explicit acl rule to satisfy Issue #1649
2017-12-22 12:51:48 -05:00
Daniel Metzing
f8f9c0e7f1
Introduction of Yoda condition checking.
...
This PR aims to implement [#1924 ][1].
[1]: https://github.com/realm/SwiftLint/issues/1924
2017-12-18 15:42:13 +01:00
Josep Rodríguez
e150e5b92f
Add explicit acl rule to satisfy Issue #1649
2017-12-02 20:39:42 +00:00
Ornithologist Coder
9d2c113ba8
Adds new opt-in rule, private_action
...
Implements #1931 .
2017-11-17 18:13:48 +01:00
Tom Quist
630a676921
Added rule to prefer min/max over sorted.first and sorted.last
2017-11-06 21:10:53 +01:00
Ornithologist Coder
c7e3692ddf
Adds quick_discouraged_pending_test opt-in rule
...
Implements #1909 .
2017-10-17 14:49:36 +02:00
Ornithologist Coder
b12280cfc2
Adds opt-in quick_discouraged_focused_test rule
...
Implements #1905 .
2017-10-15 23:14:35 +02:00
Marcelo Fabri
f971d4bc39
Add override_in_extension rule
...
Fixes #1884
2017-10-07 19:33:59 -03:00
Marcelo Fabri
81b832c372
Add literal_expression_end_indentation opt-in rule
2017-10-02 02:09:45 -03:00
Marcelo Fabri
192411f9c4
Add unneeded_break_in_switch rule
...
Fixes #1870
2017-10-02 00:21:27 -03:00
Marcel Jackwerth
4945ee29b7
Add MultilineArgumentsRule
2017-09-29 23:08:46 +02:00
Samuel Susla
9dcb3dbeb7
Add contains_over_first_not_nil rule
2017-09-17 15:59:40 +01:00
Marcelo Fabri
8f05f92cd1
Add array_init opt-in rule
...
Fixes #1271
2017-09-16 02:32:48 -03:00
Austin Lu
b2a17026cc
Add SwitchCaseAlignmentRule
2017-09-12 09:26:42 -07:00
Marcelo Fabri
4f0dbfb686
Add fallthrough opt-in rule
...
Fixes #1834
2017-09-11 01:53:40 -03:00
Erik Strottmann
6fca21cdf6
Add multiple_closures_with_trailing_closure rule
...
Multiple Closures with Trailing Closure rule disallows trailing closure
syntax when passing more than one closure argument to a function.
Fixes #1801 .
2017-08-27 22:03:22 -07:00
Maz Jaleel
03676c9772
Add No Grouping Extension Rule ( #1789 )
2017-08-27 22:10:05 +01:00
Marcelo Fabri
d082f96284
Add pattern_matching_keywords rule
2017-08-26 10:05:56 -03:00
Maz Jaleel
5335060935
update rule name
2017-08-26 07:15:54 +04:00
Maz Jaleel
742bb2fd8f
initial rule implementation
2017-08-26 07:07:06 +04:00
JP Simard
d830392c95
make sourcery
2017-08-22 09:43:44 -07:00
JP Simard
ef3df839ce
Add is_disjoint rule
...
to encourage using `Set.isDisjoint(with:)` over `Set.intersection(_:).isEmpty`.
2017-08-21 16:00:33 -07:00
Marcelo Fabri
70488c9f0c
Add SuperfluousDisableCommandRule
2017-08-20 23:27:48 +02:00
Ornithologist Coder
c707adb0d8
Add quick_discouraged_call opt-in rule
...
Implements #1781 (Method calls and object initialization inside Quick
'describe' and 'context' blocks can be harmful)
2017-08-18 11:24:02 +02:00