Skip to content

Commit

Permalink
fix: conflicting rules of swiftlint and swiftformat
Browse files Browse the repository at this point in the history
  • Loading branch information
mflknr committed Apr 25, 2024
1 parent a388dd2 commit e8a66c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ excluded:
- .build

disabled_rules:
- opening_brace

analyzer_rules:
- capture_variable
Expand Down Expand Up @@ -49,7 +50,7 @@ opt_in_rules:
- explicit_enum_raw_value
- explicit_init
#- explicit_top_level_acl
- explicit_type_interface
#- explicit_type_interface
- extension_access_modifier
- fallthrough
- fatal_error_message
Expand Down Expand Up @@ -95,7 +96,6 @@ opt_in_rules:
- number_separator
#- object_literal
- one_declaration_per_file # has been added to the source, but has not been released yet
- opening_brace
- operator_usage_whitespace
- optional_enum_case_matching
- overridden_super_call
Expand Down
18 changes: 15 additions & 3 deletions Tests/VersionCompareTests/VersionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ final class VersionTests: XCTestCase {
for validVersionData in validVersionData {
let version: Version? = Version(validVersionData.0)
XCTAssertNotNil(version, "Expected object from string `\(validVersionData.0)` not to be nil!")
XCTAssertEqual(version!.coreString, validVersionData.1, "Expected versionCode to be \(validVersionData.1), is: \(version!.coreString)")
XCTAssertEqual(
version!.coreString,
validVersionData.1,
"Expected versionCode to be \(validVersionData.1), is: \(version!.coreString)"
)
XCTAssertEqual(version!.debugDescription, version!.description)
if let expectedExtension = validVersionData.2 {
XCTAssertEqual(
Expand All @@ -117,7 +121,11 @@ final class VersionTests: XCTestCase {
// equivalent to `let version: Version = ""`
let version = Version(stringLiteral: validVersionData.0)
XCTAssertNotNil(version, "Expected object from string `\(validVersionData.0)` not to be nil!")
XCTAssertEqual(version.coreString, validVersionData.1, "Expected versionCode to be \(validVersionData.1), is: \(version.coreString)")
XCTAssertEqual(
version.coreString,
validVersionData.1,
"Expected versionCode to be \(validVersionData.1), is: \(version.coreString)"
)
XCTAssertEqual(version.debugDescription, version.description)
if let expectedExtension = validVersionData.2 {
XCTAssertEqual(
Expand All @@ -135,7 +143,11 @@ final class VersionTests: XCTestCase {
// equivalent to `let version: Version = ""`
let version: Version = "\(validVersionData.0)"
XCTAssertNotNil(version, "Expected object from string `\(validVersionData.0)` not to be nil!")
XCTAssertEqual(version.coreString, validVersionData.1, "Expected versionCode to be \(validVersionData.1), is: \(version.coreString)")
XCTAssertEqual(
version.coreString,
validVersionData.1,
"Expected versionCode to be \(validVersionData.1), is: \(version.coreString)"
)
XCTAssertEqual(version.debugDescription, version.description)
if let expectedExtension = validVersionData.2 {
XCTAssertEqual(
Expand Down

0 comments on commit e8a66c3

Please sign in to comment.