Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

update SwiftLint workflow to match readme & Fix's Swiftlint warnings for version 0.41.0 #530

Merged
merged 3 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ on:

jobs:
SwiftLint:
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
with:
args: --config Emitron/.swiftlint.yml
- name: Install Swiftlint
run: brew install swiftlint

- name: Run Swiftlint
run: swiftlint --config Emitron/.swiftlint.yml
2 changes: 1 addition & 1 deletion Emitron/Emitron/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extension String {
static let library = "Library"
static let loading = "Loading…"
static let myTutorials = "My Tutorials"
static let newest = "Newest"
static let newest = "Newest"
static let popularity = "Popularity"
static let resetFilters = "Reset Filters"
static let search = "Search…"
Expand Down
2 changes: 1 addition & 1 deletion Emitron/Emitron/Downloads/DownloadService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ extension DownloadService {
extension DownloadService {
private func configureWifiObservation() {
// Track the network status
networkMonitor.pathUpdateHandler = { [weak self] path in
networkMonitor.pathUpdateHandler = { [weak self] _ in
self?.checkQueueStatus()
}
networkMonitor.start(queue: DispatchQueue.global(qos: .utility))
Expand Down
2 changes: 1 addition & 1 deletion Emitron/Emitron/Networking/JSONAPI/JSONAPIDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class JSONAPIDocument {
// MARK: - Properties
var meta: [String: Any] = [:]
var included: [JSONAPIResource] = []
var data: [JSONAPIResource] = []
var data: [JSONAPIResource] = []
var errors: [JSONAPIError] = []
var links: [String: URL] = [:]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import SwiftyJSON
public class JSONAPIRelationship {
// MARK: - Properties
var meta: [String: Any] = [:]
var data: [JSONAPIResource] = []
var data: [JSONAPIResource] = []
var links: [String: URL] = [:]
var type: String = ""

Expand Down
2 changes: 1 addition & 1 deletion Emitron/Emitron/Networking/Requests/Parameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ enum Param {

static func sort(for value: ParameterSortValue,
descending: Bool) -> Parameter {
let key = "sort"
let key = "sort"
let value = "\(descending ? "-" : "")\(value.rawValue)"

return Parameter(key: key, value: value, displayName: "Sort", sortOrdinal: 0)
Expand Down
8 changes: 4 additions & 4 deletions Emitron/emitronScreenshots/SnapshotHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ open class Snapshot: NSObject {

private extension XCUIElementAttributes {
var isNetworkLoadingIndicator: Bool {
if hasWhiteListedIdentifier {
if hasAllowedIdentifier {
return false
}

Expand All @@ -248,10 +248,10 @@ private extension XCUIElementAttributes {
return hasOldLoadingIndicatorSize || hasNewLoadingIndicatorSize
}

var hasWhiteListedIdentifier: Bool {
let whiteListedIdentifiers = ["GeofenceLocationTrackingOn", "StandardLocationTrackingOn"]
var hasAllowedIdentifier: Bool {
let allowedIdentifiers = ["GeofenceLocationTrackingOn", "StandardLocationTrackingOn"]

return whiteListedIdentifiers.contains(identifier)
return allowedIdentifiers.contains(identifier)
}

func isStatusBar(_ deviceWidth: CGFloat) -> Bool {
Expand Down