Commit Graph

14 Commits

Author SHA1 Message Date
Zev Eisenberg fcf848608e
Add Inline test failure messages (#3040)
* Add Example wrapper in order to display test failures inline when running in Xcode.
* Stop using Swift 5.1-only features so we can compile on Xcode 10.2.
* Wrap strings in Example.
* Add Changelog entry.
* Wrap all examples in Example struct.
* Better and more complete capturing of line numbers.
* Fix broken test.
* Better test traceability.
* Address or disable linting warnings.
* Add documentation comments.
* Disable linter for a few cases.
* Limit mutability and add copy-and-mutate utility functions.
* Limit scope of mutability.
2020-02-02 10:35:37 +02:00
JP Simard 0e862ca9c4
Enable vertical whitespace rules in SwiftLint
and fix violations
2018-12-02 14:01:23 -08:00
Marcelo Fabri 6937f35ae4 Fix false positive on attributes rule
Fixes #2297
2018-07-21 18:18:25 -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
Marcelo Fabri 63e95a22c5 Refactoring tests that create RuleDescriptions 2017-07-02 17:10:26 +02:00
Marcelo Fabri e86763739f Move kind to RuleDescription 2017-07-02 15:50:16 +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
Marcelo Fabri 9757442491 Moving Swift 2 tests to a single file 2016-12-30 00:44:22 -02:00
Marcelo Fabri d75cd234f7 Run tests with Swift 2.3 set for SourceKitten
This should help preventing issues like #1019.
2016-12-30 00:06:51 -02:00
Marcelo Fabri 9e4d464e45 Add violation markers in rules 2016-12-18 01:07:51 -02:00
Marcelo Fabri b599dc49cb Make AttributesRule opt-in 2016-12-12 23:42:18 -02:00
Marcelo Fabri e4a556dea5 Handle consecutive lines with attributes 2016-12-12 23:02:04 -02:00
Marcelo Fabri 8da7f06cab Running AttributesRulesTests on Linux 2016-12-12 00:11:58 -02:00
Marcelo Fabri 0c018a15c7 Swift 3 migration 2016-12-04 18:19:44 -02:00