Commit Graph

50 Commits

Author SHA1 Message Date
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
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
JP Simard fbeaaeb972 Use Sequence.reduce(into:) when possible 2018-04-22 20:46:46 -07:00
Ash Furrow e5ff6063ff Disables type length for test class. 2018-03-22 09:42:56 -07:00
Ash Furrow 173ca11b2a Adds more tests for #2056. 2018-03-22 09:42:56 -07:00
Ash Furrow 63658418c4 Adds unit test for force-exclude flag. 2018-03-22 09:42:56 -07:00
Marcelo Fabri 3945fb7935 Fix test when running with SPM 2018-02-11 18:22:59 -08:00
Jamie Edge 879a38dbea Sort filenames within path tests to allow for OS differences. 2018-02-11 18:01:10 -08:00
Jamie Edge 0920b4bbef Add test for directories with a '.swift' suffix being treated as files. 2018-02-11 18:01:09 -08:00
Marcelo Fabri 03b4d6b020 Fix violations introduced when linting with Swift 4.1
Part of #2021
2018-02-03 22:23:48 -08:00
Noah McCann 424ff6906c Added additional test cases to verify indentation configuration. 2018-01-03 23:05:49 -08:00
Noah McCann 01debda323 Added Indentation to existing tests 2018-01-03 23:05:48 -08:00
JP Simard 3fb9f8ec4a remove superfluous 'disable' commands 2017-08-20 23:27:48 +02:00
Marcelo Fabri 182915dffa Add tests 2017-08-17 19:59:23 +02:00
JP Simard de08c7a447 reduce scope of disabled rule in ConfigurationTests.swift 2017-08-02 13:35:48 -07:00
Stéphane Copin f86a99ee66 Split ConfigurationTests.swift file in multiple files 2017-08-02 13:06:08 -07:00
Stéphane Copin 3ad4842bcd Small changes and refactoring based on github Feedback 2017-08-02 13:05:26 -07:00
Stéphane Copin 8e6c3edc39 Add more tests related to duplicated rules / all rules enabled Configurations 2017-08-02 13:05:26 -07:00
Stéphane Copin 9f1f454cf9 Refactor the way Configuration objects are created with regards to rules 2017-08-02 13:05:26 -07:00
Stéphane Copin a1ab5124d0 Add more tests related to nested configurations 2017-08-02 13:05:26 -07:00
Stéphane Copin f5f63c9072 Update tests to reflect nested configuration changes 2017-08-02 13:05:26 -07:00
Marcelo Fabri c01f4bd19f Enable extension_access_modifier rule 2017-07-21 21:08:52 +02:00
Marcelo Fabri 663081cfbd Fix crash when using --config and --path with a Swift file
Fixes #1694
2017-07-19 20:53:55 +02:00
J Cheyo Jimenez e72d09bc31 added fileprivateRule 2017-07-03 01:09:42 +02:00
Marcelo Fabri 68c1f3c1ab Fix configuration issue when using custom paths
Fixes #1631
2017-06-24 22:54:10 +02:00
Marcelo Fabri dbdc9f7788 Add a test for loading custom configuration 2017-06-13 21:41:48 +02:00
JP Simard 25a92c4e03 automatically generate LinuxMain.swift using Sourcery
This adds 6 tests that were accidentally not being run on Linux:

* LineLengthConfigurationTests.testLineLengthConfigurationInitialiserSetsIgnoresComments
* LineLengthConfigurationTests.testLineLengthConfigurationInitialiserSetsIgnoresFunctionDeclarations
* LineLengthConfigurationTests.testLineLengthConfigurationThrowsOnBadConfigValues
* LineLengthRuleTests.testLineLengthWithIgnoreCommentsEnabled
* LineLengthRuleTests.testLineLengthWithIgnoreFunctionDeclarationsEnabled
* RegionTests.testSeveralRegionsFromSeveralCommands
2017-06-02 14:28:37 -07:00
Víctor Pimentel 5ed010c9c0 Change LinterCache to use file modification dates instead of hashing files with a weak algorithm. 2017-05-18 13:39:05 -07:00
Marcelo Fabri a150e2679c Updating test 2017-01-23 21:38:56 -02:00
JP Simard 9e7cdc3282 update SwiftLintFramework/Protocols to follow Swift 3 API Design Guidelines 2017-01-09 19:19:25 -08:00
JP Simard c5c2e21120 update SwiftLintFramework/Models to follow Swift 3 API Design Guidelines 2017-01-09 19:05:29 -08:00
JP Simard a291bb594a update SwiftLintFramework/Extensions to follow Swift 3 API Design Guidelines 2017-01-09 17:53:07 -08:00
Marcelo Fabri 3b682fb116 Remove support to non-deprecated aliases 2017-01-03 16:14:34 -02:00
Marcelo Fabri 989ed354fb Make tests work again on Linux 2017-01-03 15:25:51 -02:00
Marcelo Fabri 04fc177d84 PR feedback 2017-01-03 11:00:00 -02:00
Marcelo Fabri a5683fa393 PR feedback 2017-01-02 16:21:10 -02:00
Marcelo Fabri c82370842e Fixing tests on Linux 2017-01-02 16:21:10 -02:00
Marcelo Fabri 2e8ada85b1 Logging deprecation warning and adding tests 2017-01-02 16:21:10 -02:00
Marcelo Fabri 07b14d852f Handle duplicated alias configuration 2017-01-02 16:21:10 -02:00
Marcelo Fabri df8429d2eb Add support for rule aliases 2017-01-02 16:21:10 -02:00
Marcelo Fabri 55f7b04a6f Fixing existing violations 2016-12-26 18:44:37 -02:00
Marcelo Fabri c43f808cfc Re-enable ConfigurationTests.testExcludedPaths 2016-12-26 13:32:13 -02:00
Marcelo Fabri 68ee2008af Fixing existing violations 2016-12-22 00:09:27 -02:00
JP Simard 97e798dc70 add LinuxMain.swift and allTests extensions
to run all unit tests on Linux
2016-12-11 14:04:49 -08:00
JP Simard 5161b5d46f exclude TestFileManager and testExcludedPaths() from being compiled on Linux
since Swift on Linux can't override methods declared in extensions yet.
2016-12-11 14:04:49 -08:00
JP Simard 0faf567931 use bridge() rather than explict or implicit casts
this is a step in aligning the code to compile on both Darwin and
Linux
2016-12-11 13:47:44 -08:00
Norio Nomura 7c12a63e8f Merge commit '58eb0f69c4055bb2cb89b3df278eca6ce0fb1c34' into swift3.0
* commit '58eb0f69c4055bb2cb89b3df278eca6ce0fb1c34':
  generally clean up usage of swiftlint comment commands
  update README to reflect the ability to specify multiple rules in commands
  add changelog entry
  allow specifying multiple rule identifiers in comment commands

# Conflicts:
#	Source/SwiftLintFramework/Extensions/NSRegularExpression+SwiftLint.swift
#	Source/SwiftLintFramework/Models/Command.swift
#	Source/SwiftLintFramework/Rules/LegacyNSGeometryFunctionsRule.swift
#	Tests/SwiftLintFrameworkTests/ConfigurationTests.swift
#	Tests/SwiftLintFrameworkTests/IntegrationTests.swift
2016-11-30 18:42:40 +09:00
Norio Nomura ee638ef428 Merge commit '20870e7ab140e39dbe426feb322e8b02c7cfc993' into swift3.0
* commit '20870e7ab140e39dbe426feb322e8b02c7cfc993':
  fix single file usage: `swiftlint lint --path File.swift`

# Conflicts:
#	Source/SwiftLintFramework/Extensions/NSFileManager+SwiftLint.swift
#	Source/SwiftLintFramework/Models/Configuration.swift
#	Tests/SwiftLintFrameworkTests/ConfigurationTests.swift
2016-11-30 14:04:45 +09:00
Norio Nomura 121d19b941 Support Swift Package Manager on macOS 2016-11-08 20:35:30 +09:00