Skip to content

Commit

Permalink
Update project for new swiftlint; (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
Antondomashnev authored Mar 21, 2018
1 parent b4df45c commit 65ab907
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion FBSnapshotsViewer/Menu/User Interface/MenuController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class MenuController {
}

// MARK: - MenuUserInterface
extension MenuController: MenuUserInterface {
extension MenuController: MenuUserInterface {
func setNewTestResults(available: Bool) {
statusItem.button?.image = NSImage(named: available ? "menu_icon_red" : "menu_icon")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ extension PreferencesInteractor: PreferencesInteractorInput {
switch configuration.derivedDataFolder.type {
case .xcodeDefault:
assertionFailure("Unexpected call to modify derived data folder path while the type of derived data is Xcode")
break
case .xcodeCustom:
configuration = Configuration(derivedDataFolder: DerivedDataFolder.xcodeCustom(path: path))
case .appcode:
Expand Down
2 changes: 1 addition & 1 deletion FBSnapshotsViewerTests/SnapshotTestResultSwapperSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class SnapshotTestResultSwapperSpec: QuickSpec {

context("given recorded snapshot test result") {
beforeEach {
testResult = SnapshotTestResult.recorded(testInformation:testInformation, referenceImagePath: "Bar", build: build)
testResult = SnapshotTestResult.recorded(testInformation: testInformation, referenceImagePath: "Bar", build: build)
}

it("returns false") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class TestResultsCollectionViewOutletsSpec: QuickSpec {
var testResultsDisplayInfo: TestResultsDisplayInfo!

beforeEach {
let build1 = Build(date: Date(), applicationName: "MyApp", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
let build1 = Build(date: Date(), applicationName: "MyApp", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
let testInformation1 = SnapshotTestInformation(testClassName: "testClassName", testName: "testName", testFilePath: "testFilePath", testLineNumber: 1)
let snapshotTestResult1 = SnapshotTestResult.failed(testInformation: testInformation1, referenceImagePath: "referenceImagePath.png", diffImagePath: "diffImagePath.png", failedImagePath: "failedImagePath.png", build: build1)
let testResult1 = TestResultDisplayInfo(testResult: snapshotTestResult1)
let sectionTitle1 = TestResultsSectionTitleDisplayInfo(build: build1, testContext: "Context1")
let section1 = TestResultsSectionDisplayInfo(title: sectionTitle1, items: [testResult1])

let build2 = Build(date: Date(), applicationName: "MyApp", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
let build2 = Build(date: Date(), applicationName: "MyApp", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
let testInformation2 = SnapshotTestInformation(testClassName: "testClassName", testName: "testName", testFilePath: "testFilePath", testLineNumber: 1)
let snapshotTestResult2 = SnapshotTestResult.failed(testInformation: testInformation2, referenceImagePath: "referenceImagePath.png", diffImagePath: "diffImagePath.png", failedImagePath: "failedImagePath.png", build: build2)
let testResult2 = TestResultDisplayInfo(testResult: snapshotTestResult2)
Expand Down
10 changes: 5 additions & 5 deletions FBSnapshotsViewerTests/TestResultsPresenterSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class TestResultsPresenterSpec: QuickSpec {
var testInformation: SnapshotTestInformation!

beforeEach {
build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
testInformation = SnapshotTestInformation(testClassName: "testClassName", testName: "MyTest", testFilePath: "testFilePath", testLineNumber: 1)
testResult = SnapshotTestResult.recorded(testInformation: testInformation, referenceImagePath: "foo/bar.png", build: build)
testResultDisplayInfo = TestResultDisplayInfo(testResult: testResult)
Expand All @@ -96,7 +96,7 @@ class TestResultsPresenterSpec: QuickSpec {
var testInformation: SnapshotTestInformation!

beforeEach {
build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
testInformation = SnapshotTestInformation(testClassName: "testClassName", testName: "MyTest", testFilePath: "testFilePath", testLineNumber: 1)
testResult = SnapshotTestResult.recorded(testInformation: testInformation, referenceImagePath: "foo/bar.png", build: build)
testResultDisplayInfo = TestResultDisplayInfo(testResult: testResult)
Expand Down Expand Up @@ -125,7 +125,7 @@ class TestResultsPresenterSpec: QuickSpec {
var testResults: [SnapshotTestResult] = []

beforeEach {
let build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
let build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
let testInformation = SnapshotTestInformation(testClassName: "testClassName", testName: "MyTest", testFilePath: "testFilePath", testLineNumber: 1)
let snapshotTestResult = SnapshotTestResult.failed(testInformation: testInformation, referenceImagePath: "referenceImagePath", diffImagePath: "diffImagePath", failedImagePath: "failedImagePath", build: build)
let titleInfo = TestResultsSectionTitleDisplayInfo(build: build, testContext: "Context")
Expand Down Expand Up @@ -155,7 +155,7 @@ class TestResultsPresenterSpec: QuickSpec {
var testResults: [SnapshotTestResult] = []

beforeEach {
let build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
let build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
let testInformation = SnapshotTestInformation(testClassName: "testClassName", testName: "testName", testFilePath: "testFilePath", testLineNumber: 1)
let snapshotTestResult = SnapshotTestResult.failed(testInformation: testInformation, referenceImagePath: "referenceImagePath", diffImagePath: "diffImagePath", failedImagePath: "failedImagePath", build: build)
testResults = [snapshotTestResult]
Expand All @@ -176,7 +176,7 @@ class TestResultsPresenterSpec: QuickSpec {
var testInformation: SnapshotTestInformation!

beforeEach {
build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
build = Build(date: Date(), applicationName: "FBSnapshotsViewer", fbReferenceImageDirectoryURLs: [URL(fileURLWithPath: "foo/bar", isDirectory: true)])
testInformation = SnapshotTestInformation(testClassName: "testClassName", testName: "MyTest", testFilePath: "testFilePath", testLineNumber: 1)
testResult = SnapshotTestResult.recorded(testInformation: testInformation, referenceImagePath: "foo/bar.png", build: build)
testResultDisplayInfo = TestResultDisplayInfo(testResult: testResult)
Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PODS:
- Sourcery (0.9.0)
- Sparkle (1.18.1)
- SwiftGen (4.2.1)
- SwiftLint (0.22.0)
- SwiftLint (0.25.0)

DEPENDENCIES:
- KZFileWatchers (~> 1.0)
Expand All @@ -26,7 +26,7 @@ SPEC CHECKSUMS:
Sourcery: e3829460a1fa0bcd3b689e6087a89cc063cd2289
Sparkle: 06ea33170007c5937ee54da481b4481af98fac79
SwiftGen: 2ba2a88fc6130b96e38e2baa0029e4bd222ffd85
SwiftLint: 1134786caedd2caab0560d2f36b76414a5a56808
SwiftLint: e14651157288e9e01d6e1a71db7014fb5744a8ea

PODFILE CHECKSUM: f2aa312bd89688aa16287520141fb963f25369df

Expand Down

0 comments on commit 65ab907

Please sign in to comment.