Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
chamburr committed Jun 1, 2022
1 parent 209caf9 commit 1476017
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Source: https://github.com/sindresorhus/swiftlint-sindre (with modifications)

# Rules covered by SwiftFormat are commented out
whitelist_rules:
only_rules:
- anyobject_protocol
- array_init
- attributes
Expand Down Expand Up @@ -165,3 +165,5 @@ identifier_name:
- "x2"
- "y1"
- "y2"
opening_brace:
allow_multiline_func: true
4 changes: 2 additions & 2 deletions Glance/Extensions/NSMenuItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ final class ObjectAssociation<T: Any> {
}

extension NSMenuItem {
typealias ActionClosure = ((NSMenuItem) -> Void)
typealias ActionClosure = (NSMenuItem) -> Void

private struct AssociatedKeys {
private enum AssociatedKeys {
static let onActionClosure = ObjectAssociation<ActionClosure>()
}

Expand Down
2 changes: 1 addition & 1 deletion Glance/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ViewController: NSViewController {
let supportedFilesWC = SupportedFilesWC(windowNibName: NSNib.Name("SupportedFilesWC"))
supportedFilesWC.showWindow(nil)
}

@IBAction private func openGitHubRepository(_: NSButton) {
websiteURL.open()
}
Expand Down
4 changes: 2 additions & 2 deletions Mintfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nicklockwood/SwiftFormat@0.44.7
realm/SwiftLint@0.39.2
nicklockwood/SwiftFormat@0.49.9
realm/SwiftLint@0.47.1
2 changes: 1 addition & 1 deletion QLPlugin/Utils/HTMLRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extension HTMLRendererError: LocalizedError {
}
}

class HTMLRenderer {
enum HTMLRenderer {
/// Throws an error if the return value indicates one. Because all `HTMLConverter` return values
/// are C strings, errors are implemented as return values starting with "error: ".
static func throwIfErrored(fileType: String, returnValue: String) throws {
Expand Down
3 changes: 2 additions & 1 deletion QLPlugin/Views/Previews/TARPreview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ class TARPreview: Preview {
}

private func parseGZIPSize(lines: String)
-> (sizeUncompressed: Int?, compressionRatio: Double?) {
-> (sizeUncompressed: Int?, compressionRatio: Double?)
{
let sizeMatches = lines.matchRegex(regex: sizeRegex)
let sizeUncompressed = Int(sizeMatches[0][1])
let compressionRatio = Double(sizeMatches[0][2])
Expand Down

0 comments on commit 1476017

Please sign in to comment.