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
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
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
Yusuke Ohashi
a941b2f242
added SonarQube reporter.
2018-08-16 15:02:47 +09:00
Marcelo Fabri
5c9b6b9c62
Merge pull request #2342 from ornithocoder/closure_length
...
Adds closure_body_length opt-in rule
2018-08-09 07:55:49 -07:00
Marcelo Fabri
14f677e6bb
Fix false positive on file_name rule when using nested types
...
Fixes #2325
2018-08-08 09:38:20 -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
JP Simard
3961d6482b
Organize rules by kind in Xcode project ( #2341 )
2018-08-05 18:54:05 -07:00
Marcelo Fabri
455d65cffc
Fix duplicated entry in project.pbxproj
2018-08-03 21:25:46 -07:00
Marcelo Fabri
cfee95d144
Revert unwanted change on project.pbxproj
2018-08-01 09:09:45 -07:00
Marcelo Fabri
12996ef1f5
release 0.27.0
2018-07-31 09:28:44 -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
Keith Smiley
949b8b1c94
Update project
2018-07-26 10:21:14 -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
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
Cihat Gündüz
dc44fbcac3
Add tests for if_only configuration option
2018-07-24 13:02:30 +02:00
Cihat Gündüz
51a9a62159
Add if_only option to rule conditional_returns_on_newline
2018-07-23 10:22:28 +02:00
Marcelo Fabri
8aadb802fb
Split RulesTests into several test cases, generating them automatically
2018-07-21 17:23:08 -07: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
5c3661704c
Run tests in parallel in Xcode 10
2018-06-24 11:47: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
1d3bba6df2
Bump defined swift versions to 4.0
2018-05-30 14:03:45 +10: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
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