mirror of
https://github.com/mas-cli/mas
synced 2025-03-06 23:57:21 +00:00
Enable swiftlint 0.57.1 rules.
Partial #696 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
87f97491b7
commit
b9de23aa2a
6 changed files with 19 additions and 13 deletions
|
@ -8,30 +8,25 @@
|
|||
opt_in_rules:
|
||||
- all
|
||||
disabled_rules:
|
||||
- closure_body_length
|
||||
# eventually enable
|
||||
- file_header
|
||||
- one_declaration_per_file
|
||||
- trailing_comma
|
||||
# never enable
|
||||
- contrasted_opening_brace
|
||||
- explicit_acl
|
||||
- explicit_enum_raw_value
|
||||
- explicit_top_level_acl
|
||||
- explicit_type_interface
|
||||
- file_header
|
||||
- file_name
|
||||
- force_unwrapping
|
||||
- function_body_length
|
||||
- inert_defer
|
||||
- legacy_objc_type
|
||||
- no_extension_access_modifier
|
||||
- no_grouping_extension
|
||||
- number_separator
|
||||
- one_declaration_per_file
|
||||
- prefixed_toplevel_constant
|
||||
- quick_discouraged_call
|
||||
- quick_discouraged_pending_test
|
||||
- required_deinit
|
||||
- sorted_enum_cases
|
||||
- trailing_comma
|
||||
- unused_capture_list
|
||||
- vertical_whitespace_between_cases
|
||||
file_name:
|
||||
excluded: [Finder.swift, Utilities.swift]
|
||||
file_types_order:
|
||||
order:
|
||||
[
|
||||
|
@ -41,6 +36,8 @@ file_types_order:
|
|||
[preview_provider],
|
||||
[library_content_provider],
|
||||
]
|
||||
number_separator:
|
||||
minimum_length: 6
|
||||
type_contents_order:
|
||||
order:
|
||||
[
|
||||
|
|
|
@ -27,6 +27,7 @@ extension AppLibrary {
|
|||
/// - Parameter appID: app ID for app(s).
|
||||
/// - Returns: [SoftwareProduct] of matching apps.
|
||||
func installedApps(withAppID appID: AppID) -> [SoftwareProduct] {
|
||||
// swiftlint:disable:next legacy_objc_type
|
||||
let appID = NSNumber(value: appID)
|
||||
return installedApps.filter { $0.itemIdentifier == appID }
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ extension AppID {
|
|||
}
|
||||
}
|
||||
|
||||
// swiftlint:disable:next legacy_objc_type
|
||||
extension NSNumber {
|
||||
var appIDValue: AppID {
|
||||
uint64Value
|
||||
|
|
|
@ -16,6 +16,7 @@ protocol SoftwareProduct {
|
|||
var bundleIdentifier: String { get set }
|
||||
var bundlePath: String { get set }
|
||||
var bundleVersion: String { get set }
|
||||
// swiftlint:disable:next legacy_objc_type
|
||||
var itemIdentifier: NSNumber { get set }
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// swiftlint:disable:next blanket_disable_command
|
||||
// swiftlint:disable attributes discouraged_none_name file_length file_types_order identifier_name
|
||||
// swiftlint:disable:next blanket_disable_command
|
||||
// swiftlint:disable implicitly_unwrapped_optional line_length missing_docs
|
||||
// swiftlint:disable implicitly_unwrapped_optional legacy_objc_type line_length missing_docs
|
||||
import AppKit
|
||||
import ScriptingBridge
|
||||
|
||||
|
|
|
@ -6,8 +6,14 @@
|
|||
#
|
||||
---
|
||||
disabled_rules:
|
||||
- closure_body_length
|
||||
- force_cast
|
||||
- force_try
|
||||
- function_body_length
|
||||
- implicitly_unwrapped_optional
|
||||
- large_tuple
|
||||
- legacy_objc_type
|
||||
- no_magic_numbers
|
||||
- quick_discouraged_call
|
||||
- quick_discouraged_pending_test
|
||||
- required_deinit
|
||||
|
|
Loading…
Add table
Reference in a new issue