Norio Nomura
d5e37987df
Change XCTestCase.verifyRule to show detail of non-triggering examples on failing test
2016-02-21 22:35:56 +09:00
Norio Nomura
01b06164e3
Apply corrections made by refined CommaRule on running IntegrationTests.testSwiftLintAutoCorrects()
2016-02-17 11:15:41 +09:00
Norio Nomura
fc2207521a
Fix verifyRule() crashed on triggeringExample did not cause violation
2016-02-14 23:00:37 +09:00
JP Simard
79d796817c
deprecate use_nested_configs: always consider nested configuration files
2016-02-12 10:55:20 -08:00
JP Simard
601470ab8f
expand some instances of "config" to "configuration"
2016-02-12 10:53:36 -08:00
JP Simard
4ffb9358d0
rename CustomRulesConfig to CustomRulesConfiguration
2016-02-12 10:53:36 -08:00
JP Simard
144495306b
rename rule configurations to expand "Config" to "Configuration"
2016-02-12 10:53:36 -08:00
JP Simard
7e07e813ca
rename RuleConfig to RuleConfiguration
2016-02-12 10:53:36 -08:00
JP Simard
6befe7e5a4
expand many instances of "config" to "configuration"
2016-02-12 10:53:36 -08:00
JP Simard
d9cd1d670a
rename Rule.init(config:) to Rule.init(configuration:)
2016-02-12 10:53:36 -08:00
JP Simard
db71448c47
rename Rule.configDescription to Rule.configurationDescription
2016-02-12 10:53:36 -08:00
JP Simard
3f4b993847
rename ConfigProviderRule to ConfigurationProviderRule
2016-02-12 10:53:36 -08:00
JP Simard
048c5dda84
expand "config" to "configuration" in Configuration.swift
...
with an exception being made for the "use_nested_configs" configuration key,
since that's already long enough as it is
2016-02-12 10:53:36 -08:00
JP Simard
1af80bcc31
remove Configuration.disabledRules
2016-02-10 17:26:06 -08:00
JP Simard
1866edae77
adjust access control levels for many APIs in SwiftLintFramework
...
this is done in an effort to stabilize the API for SwiftLint 1.0.
2016-02-10 17:26:06 -08:00
JP Simard
fe110a81ed
add an integration test to ensure SwiftLint autocorrects successfully
2016-02-08 14:23:36 -08:00
JP Simard
a0524644f5
move Configuration.rulesFromDict to RuleList.configuredRulesWithDictionary
2016-02-08 13:24:13 -08:00
JP Simard
8270c80e22
fix tests on SPM
2016-02-08 13:21:40 -08:00
JP Simard
9ee4e2e077
fix tests
2016-02-08 13:21:40 -08:00
JP Simard
368ee9544a
fold ConfigurableRule into Rule
2016-02-08 13:08:51 -08:00
JP Simard
9b55b8923a
move assertCorrection into Configuration extension
...
to not clog up verifyRule, making it harder to read.
2016-02-07 10:13:27 -08:00
JP Simard
3872e5680f
test that non-triggers are never corrected and that corrections are never no-ops
2016-02-07 10:13:27 -08:00
JP Simard
c4ed26c05c
allow passing an optional --reporter parameter to swiftlint lint
2016-02-06 11:14:23 -08:00
Norio Nomura
3c53a23363
[SPM] Fix build errors and test fails
...
Add `import Foundation` explicitly.
Change getting paths from using `NSBundle` to static string if `SWIFT_PACKAGE`
Add `SWIFT_PACKAGE` to some condition
2016-02-03 14:01:08 +09:00
Norio Nomura
43f99fffb4
[SPM] Make test cases conform to XCTestCaseProvider
2016-02-03 13:56:34 +09:00
Norio Nomura
267417e9a5
[SPM] Add Source/SwiftLintFrameworkTests/main.swift
...
That also added to `project.pbxproj` for browsing in Xcode's Project Navigator.
That used only on building by SPM
2016-02-03 13:04:55 +09:00
JP Simard
b70006da03
fix order of testFunctionParameterCountRule
2016-01-31 14:09:11 -08:00
Denis Lebedev
b9676eb58f
Rename ParametersListLengthRule -> FunctionParameterCountRule
2016-01-31 14:09:11 -08:00
Denis Lebedev
81e7f347ce
Implement ParametersListLengthRule
2016-01-31 14:09:11 -08:00
Daniel Beard
998bed9716
Add whitelist only rules
2016-01-29 13:55:31 -08:00
Robin Kunde
f65b9d3e44
Disable SeverityLevelsConfig error ruleParam if only warning is set. This prevents the potential creation of invalid configs by implicit definition in Yaml.
2016-01-28 10:39:15 -08:00
JP Simard
98fe6c4c81
fix Xcode 7.3 compilation
...
XCTest APIs now use StaticString instead of String for file names
and we can't create a StaticString for violation file names, so just revert
to the old XCTest check
2016-01-26 16:51:30 -08:00
Benjamin Otto
fccd2796d1
Changed location for force unwrapping rule violation
...
- Changed the `Location` of the StyleViolation to point to the `!` that actually does the unwrapping
2016-01-26 10:48:40 -08:00
Scott Hoyt
b76a3d2ae6
Added tests.
2016-01-25 07:26:31 -08:00
JP Simard
0742edcc8e
drop redundant "Rule" from function names in RulesTests
2016-01-24 13:43:50 -08:00
JP Simard
ac27ef3206
sort all RulesTests and make all tests follow consistent naming
2016-01-24 13:29:47 -08:00
JP Simard
41902fc5a1
moved tests from ASTRuleTests to RulesTests
2016-01-24 13:21:52 -08:00
JP Simard
1db304e848
renamed StringRuleTests.swift to RulesTests.swift
2016-01-24 13:20:52 -08:00
JP Simard
4ae7f2fca9
use verifyRule to test FileLengthRule
2016-01-24 13:18:19 -08:00
JP Simard
e0e0ec4e68
use verifyRule to test LineLengthRule
2016-01-24 13:15:31 -08:00
JP Simard
a9f681955b
use verifyRule to test TypeBodyLengthRule
2016-01-24 13:06:50 -08:00
JP Simard
1fa78ee11b
unify test names
2016-01-24 12:44:17 -08:00
JP Simard
5d0c5609b4
removed duplicate testTypeName()
2016-01-24 12:44:17 -08:00
JP Simard
af566fe9a5
rename testTypeNames to testTypeName & remove testNestedTypeNames
...
since it wasn't testing anything very useful
2016-01-24 12:44:17 -08:00
JP Simard
2b286b67b7
refactor testTypeNames to use verifyRule
2016-01-24 12:44:17 -08:00
Denis Lebedev
dbb7938f54
Add POC of complexity rule
2016-01-24 12:34:32 -08:00
Norio Nomura
78a810fd0f
Generate assertion on every violations in testSwiftLintLints()
...
It makes violations browsable on Xcode's Issue Navigator.
2016-01-24 18:15:33 +09:00
Scott Hoyt
12aba5f1b0
Rebased. Fixed new conflicts.
2016-01-23 17:48:36 -08:00
Scott Hoyt
943ed306a3
Modified names for brevity.
2016-01-23 17:42:13 -08:00
Scott Hoyt
f722bcf360
All Rules (with the exception of MissingDocs) now provide some severity configuration.
2016-01-23 17:42:13 -08:00