Skip to content

Commit

Permalink
Add more Swiftlint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 16, 2019
1 parent edf2142 commit 6e7d7d6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .swiftlint.yml
Expand Up @@ -8,7 +8,7 @@ disabled_rules:
- force_try
- large_tuple
- function_body_length
- nesting # Disabled because of https://github.com/realm/SwiftLint/issues/1151
- nesting
- type_body_length
opt_in_rules:
- empty_count
Expand Down Expand Up @@ -55,7 +55,27 @@ opt_in_rules:
- anyobject_protocol
- redundant_type_annotation
- no_extension_access_modifier
- legacy_random
- toggle_bool
- identical_operands
- collection_alignment
- static_operator
- multiline_literal_brackets
- multiline_parameters_brackets
- vertical_whitespace_opening_braces
- vertical_whitespace_closing_braces
- legacy_hashing
- object_literal
- last_where
- unused_control_flow_label
analyzer_rules:
- unused_import
- unused_private_declaration
force_cast: warning
force_unwrapping: warning
number_separator:
minimum_length: 5
object_literal:
image_literal: false # Because image literals are practically unusable
discouraged_object_literal:
color_literal: false
1 change: 1 addition & 0 deletions Gifski/util.swift
Expand Up @@ -49,6 +49,7 @@ extension NSColor {
if #available(macOS 10.14, *) {
return NSColor.controlAccentColor
} else {
// swiftlint:disable:next object_literal
return NSColor(red: 0.10, green: 0.47, blue: 0.98, alpha: 1)
}
}()
Expand Down

0 comments on commit 6e7d7d6

Please sign in to comment.