Marcelo Fabri
b92b236a5e
Add static_operator opt-in rule
...
Fixes #2395
2018-09-11 09:34:10 -07:00
Dalton Claybrook
45b0881f1d
Add Collection Alignment rule and implement basic left-alignment case
2018-09-10 23:45:56 -04:00
Marcelo Fabri
c9f315a798
Merge pull request #2372 from marcelofabri/identical_operands
...
Add identical_operands opt-in rule
2018-09-09 20:47:49 -07:00
JP Simard
53d8a3aba9
Add UnusedPrivateDeclarationRule ( #2385 )
...
* Add UnusedPrivateDeclarationRule
* Temporarily disable UnusedPrivateDeclarationRule tests on Xcode 10
So we can merge UnusedPrivateDeclarationRule without having to wait
for CircleCI to update its Xcode 10 version.
2018-09-05 21:59:45 -07:00
JP Simard
e460c5ef9c
Add Unused Import analyzer rule ( #2381 )
2018-09-02 14:45:02 -07:00
JP Simard
dcc85fb0f3
Remove unused imports ( #2382 )
2018-09-02 14:09:04 -07:00
JP Simard
2bcea4b04d
Add ability for SwiftLint to lint files with full type-checked AST awareness ( #2379 )
...
* Add LintableFilesVisitor
* Move LintCommand logic into LintOrAnalyzeCommand
to prepare for the upcoming analyze command
* Add AnalyzeCommand (not fully implemented yet in SwiftLintFramework)
* Add analyzerRules configuration member
* Add AnalyzerRule protocol
* Pass compiler arguments to validate/correct
* Add requiresFileOnDisk member to RuleDescription
This will be used by AnalyzerRules because they need a file on disk
to pass in the compiler arguments to SourceKit.
* Exclusively run AnalyzerRules when the Linter has compiler arguments
* Enable testing AnalyzerRules in TestHelpers
* Add ExplicitSelfRule
* Update documentation
* Fix `analyze --autocorrect`
* Improve performance of CompilerArgumentsExtractor
* Fix lint command actually running analyze
* Move File operations in TestHelpers into a private extension
* Add analyzer column to rules command and markdown documentation
* Use a Set literal
* Make AnalyzerRule inherit from OptInRule
* Mention analyzer_rules in readme
* Mention that analyzer rules are slow
2018-09-02 00:13:27 -07:00
Marcelo Fabri
be60504dad
Enable identical_operands rule on the project
2018-08-30 23:12:44 -07:00
Marcelo Fabri
5bb483d72b
Add identical_operands opt-in rule
2018-08-30 23:12:19 -07:00
Dalton Claybrook
4ea785c993
Add ToggleBoolRule
2018-08-30 10:22:21 -04:00
Marcelo Fabri
53647b4e6e
Add inert_defer rule
...
Fixes #2123
2018-08-26 03:10:16 -07:00
Marcelo Fabri
04b634cde7
Add prohibited_interface_builder opt-in rule
...
Fixes #2365
2018-08-25 22:53:15 -07:00
Ornithologist Coder
c4bf3dee10
Adds closure_body_length opt-in rule
...
because closure bodies should not span too many lines. Implements #52 .
Requires Swift 4.2.
2018-08-07 00:13:50 +02:00
Marcelo Fabri
12996ef1f5
release 0.27.0
2018-07-31 09:28:44 -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
Cihat Gündüz
dc44fbcac3
Add tests for if_only configuration option
2018-07-24 13:02:30 +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
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
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
Ornithologist Coder
01dc00f576
Add default rule anyobject_protocol
...
This commit implements #2283 .
2018-07-07 18:54:09 +02:00
Marcelo Fabri
701abbea94
Don’t overwrite file when formatting if not needed
...
Fixes #2249
2018-06-24 11:38:38 -07:00
Marcelo Fabri
b168296d07
Fix generic_type_rule when using Swift 4.2
2018-06-24 00:20:50 -07:00
JP Simard
8c5d2afa7c
release 0.26.0
2018-06-22 09:48:20 -07:00
Marcelo Fabri
1d28025789
Add convenience_type opt-in rule
...
Fixes #1871
2018-06-16 21:08:49 -07:00
Austin Belknap
d2981d779f
Fix XCode build issues.
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
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
JP Simard
e2b74bd867
Require Swift 4.0 or higher to build.
2018-05-30 14:00:17 +10:00
Norio Nomura
6bcabfe5f8
Detect swift-4.1.2
2018-05-13 21:39:57 +09: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
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
Marcelo Fabri
b338918b45
Merge pull request #2036 from marcelofabri/redudant-acl-set
...
[Swift 4.1] Add redundant_set_access_control rule
2018-04-24 09:19:53 -07:00
JP Simard
fbeaaeb972
Use Sequence.reduce(into:) when possible
2018-04-22 20:46:46 -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
Marcelo Fabri
5231f6c9a5
Support min Swift version in Rule description
2018-04-08 21:52:45 -07:00