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
Eric Horacek
d21b787980
Make closure end indentation rule correctable
2018-05-08 21:00:19 -07:00
freak4pc
ca47802fd4
Add tests for indented and non-indented cases (still failing WIP)
2018-05-06 23:34:14 +03:00
freak4pc
e8b64b4a72
Add indentation to SwitchCaseAlignmentRule
2018-05-06 23:34:13 +03:00
Daniel Metzing
61259692ed
Removing s from rule name
2018-04-27 08:59:02 +02:00
Daniel Metzing
9a7005912a
Add modifiers_order rule
2018-04-26 20:25:58 +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
7070c3beac
Merge pull request #2136 from realm/ks/lower-acl
...
Add LowerACLThanBodyRule
2018-04-08 10:44:44 -07:00
Norio Nomura
e62cf9611d
Remove build settings from xcodeproj that already defined in xcconfigs
2018-04-08 13:43:53 +09:00
Norio Nomura
2f8b020d65
Update xcconfigs and change test target to use Mac-XCTest.xcconfig
2018-04-08 13:39:42 +09:00
Norio Nomura
50f9fd848f
Update to recommended settings by Xcode 9.3
2018-04-08 13:28:09 +09:00
Norio Nomura
2a0ac455bc
'flatMap' is deprecated: renamed to 'compactMap(_:)'
2018-04-08 13:28:09 +09: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
6056b3e734
Moves examples to own file
...
and adds more examples.
2018-03-26 00:26:14 +02:00
Ornithologist Coder
faee8c935b
Adds opt-in rule discouraged_optional_collection
2018-03-26 00:26:13 +02:00
Frederick Pietschmann
0f95f6b6d9
Add tests for all keyword
2018-03-21 07:42:46 +01:00
Frederick Pietschmann
0ad2488d7e
Add all keyword
2018-03-21 07:42:46 +01:00
Marcelo Fabri
7b34b4b92b
Merge pull request #2094 from notorca/master
...
Fix for crash on Linux on sources with surrogate characters
2018-03-17 16:00:03 -07:00
Daniel Metzing
96d29817b4
Add untyped_error_in_catch opt-in rule
2018-03-17 12:54:51 -07:00
Cyril Lashkevich
10ba712748
Fix for crash on Linux on sources with surrogate characters
...
Because of the bug https://bugs.swift.org/browse/SR-5971 SwiftLint
crashes when linting on Linux files like https://github.com/xmartlabs/Eureka/blob/master/Example/Example/ViewController.swift
2018-03-17 19:51:24 +01:00
Davide Sibilio
5c8d6069b6
Implemented empty_string rule ( #2064 )
...
Added empty_string rule
2018-03-17 11:47:04 -07:00
J Cheyo Jimenez
cc342bde7e
moved changelog entry to correct spot
2018-03-05 22:02:54 +01: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
rounak
270bbd5db3
Rename test file
2018-02-25 19:18:38 -08:00
rounak
e515f43424
Add separate test files for ExplicitTypeInterfaceRule & Config
...
Respond to PR comments
2018-02-25 19:18:38 -08:00
Rounak
2a7abcf542
Add new configuration for Explicit Type Interface Rule to allow exempting certain types of variables
...
Signed-off-by: Rounak <rounak91@gmail.com >
2018-02-25 19:18:38 -08:00
Norio Nomura
059ee7be94
'flatMap' is deprecated: renamed to 'compactMap(_:)'
2018-02-14 19:04:53 +09: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
JP Simard
fa13551af1
Rename Configuration.Indentation to IndentationStyle
...
and move to its own file
2018-01-03 23:21:23 -08: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
JP Simard
84a39a57a6
Replace use of YodaConditionConfiguration with SeverityConfiguration
...
since YodaConditionConfiguration had no additional configuration points
2017-12-20 14:44:54 -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
Marcelo Fabri
f01ed995c7
Merge pull request #1935 from ornithocoder/private_ibaction
...
Adds private_action opt-in rule
2017-12-04 22:49:08 -08:00
Josep Rodríguez
e150e5b92f
Add explicit acl rule to satisfy Issue #1649
2017-12-02 20:39:42 +00:00
Norio Nomura
ef50910313
Move Update Tests/LinuxMain.swift build phase to SwiftLintFramework target
2017-11-28 08:36:24 +09:00