Commit Graph

149 Commits

Author SHA1 Message Date
Marcelo Fabri 88f4c8be6f Minor changes after merging #2318 2018-07-30 00:12:02 -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
Marcelo Fabri 87c44108b9 Add missing tests to LinuxMain 2018-07-29 22:59:24 -07:00
Marcelo Fabri 6ea0a5c4a1 Merge pull request #2316 from realm/ks/exclude-glob
Add support for globs in excluded paths
2018-07-29 22:46:00 -07:00
Marcelo Fabri 0820cd2976 Merge pull request #2313 from Dschee/explicit-type-interface
Add option allow_redundancy to rule explicit_type_interface
2018-07-29 22:45:17 -07:00
Marcelo Fabri 744403cedb Merge pull request #2281 from maciesielka/feature/allow-first-closure-multiline-args
add "allow_first_closure_on_same_line" configuration to "multiline_arguments"
2018-07-29 22:41:12 -07:00
Michael Ciesielka 7efce91996 Rename “allow_first_closure_on_same_line” configuration for “multiline_arguments” rule to “only_enforce_after_first_closure_on_first_line” to increase clarity. 2018-07-28 15:28:34 -04:00
Cihat Gündüz b4f960bd48 Add config option allow_redundancy 2018-07-27 11:12:46 +02: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
Keith Smiley a807d723e4 Add support for globs in excluded paths 2018-07-26 10:21:13 -07:00
Matthew Remmel 7668b90b7f Regenerated LinuxMain.swift using sourcery 2018-07-25 14:17:41 -04:00
Matthew Remmel b990eb94f8 Fixed incorrect conflict merge 2018-07-25 13:38:55 -04: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
Marcelo Fabri 37fe0f82d8 Add tests for RedundantTypeAnnotationRule 2018-07-21 17:39:29 -07:00
Marcelo Fabri 8aadb802fb Split RulesTests into several test cases, generating them automatically 2018-07-21 17:23:08 -07:00
Marcelo Fabri 41d3977412 Add test to LinuxMain 2018-07-19 08:34:03 -07:00
Marcelo Fabri 84abd41a1a Merge pull request #2285 from ornithocoder/anyobject
Add opt-in anyobject_protocol rule
2018-07-19 08:19:42 -07:00
Marcelo Fabri af588ee4be Add test to LinuxMain 2018-07-19 08:17:12 -07:00
Ornithologist Coder 01dc00f576 Add default rule anyobject_protocol
This commit implements #2283.
2018-07-07 18:54:09 +02:00
Mike Ciesielka 81ee9904b3 Add "allow_first_closure_on_same_line" configuration to "multiline_arguments" rule as proposed in #1896. add tests. 2018-07-05 11:44:16 -07:00
Marcelo Fabri 6595a8e82f Add missing tests to LinuxMain 2018-06-24 00:35:11 -07:00
Austin Belknap 1fdc5fda94 Add "No Fallthrough Only" Rule. 2018-06-11 09:30:19 -07:00
Eric Horacek 0a4b078e66 Add linux tests 2018-06-10 19:49:03 -07: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
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
freak4pc 3738512511 Added indented triggering cases 2018-05-06 23:34:14 +03: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 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 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
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 7d8afbe2af Update LinuxMain.swift 2018-04-05 08:54:43 +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 faee8c935b Adds opt-in rule discouraged_optional_collection 2018-03-26 00:26:13 +02:00
Marcelo Fabri f231e6d24b Add tests to LinuxMain 2018-03-22 09:48:55 -07:00
Frederick Pietschmann b71aba200d Extend all keyword tests 2018-03-21 07:42:46 +01:00
Frederick Pietschmann 0f95f6b6d9 Add tests for all keyword 2018-03-21 07:42:46 +01:00