-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
374 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: jdx/mise-action@v2 | ||
- run: swiftlint --strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[tools] | ||
swiftlint = "0.54.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
excluded: | ||
- Package.swift | ||
- .swiftpm | ||
- .build | ||
|
||
disabled_rules: | ||
|
||
analyzer_rules: | ||
- capture_variable | ||
#- explicit_self | ||
#- typesafe_array_init | ||
- unused_declaration | ||
- unused_import | ||
|
||
# rules that are commented out are explicitly opted out unless told otherwise | ||
opt_in_rules: | ||
- accessibility_label_for_image | ||
- accessibility_trait_for_button | ||
#- anonymous_argument_in_multiline_closure | ||
#- anyobject_protocol # deprecated | ||
- array_init | ||
- attributes | ||
- balanced_xctest_lifecycle | ||
- closure_end_indentation | ||
- closure_spacing | ||
- collection_alignment | ||
- comma_inheritance | ||
- conditional_returns_on_newline | ||
- contains_over_filter_count | ||
- contains_over_filter_is_empty | ||
- contains_over_first_not_nil | ||
- contains_over_range_nil_comparison | ||
- convenience_type | ||
#- direct_return | ||
- discarded_notification_center_observer | ||
- discouraged_assert | ||
- discouraged_none_name | ||
- discouraged_object_literal | ||
#- discouraged_optional_boolean | ||
#- discouraged_optional_collection | ||
- empty_collection_literal | ||
- empty_count | ||
- empty_string | ||
- empty_xctest_method | ||
- enum_case_associated_values_count | ||
#- explicit_enum_raw_value | ||
- expiring_todo | ||
#- explicit_acl | ||
- explicit_enum_raw_value | ||
- explicit_init | ||
#- explicit_top_level_acl | ||
- explicit_type_interface | ||
- extension_access_modifier | ||
- fallthrough | ||
- fatal_error_message | ||
- file_header | ||
#- file_name | ||
- file_name_no_space | ||
#- file_types_order | ||
- final_test_case # has been added to the source, but has not been released yet | ||
- first_where | ||
- flatmap_over_map_reduce | ||
- force_unwrapping | ||
#- function_default_parameter_at_end | ||
- ibinspectable_in_extension | ||
#- identical_operands | ||
- implicit_return | ||
- implicitly_unwrapped_optional | ||
#- indentation_width # has conflicts with default xcode settings. use strg+i to indent correctly | ||
#- inert_defer # deprecated | ||
- joined_default_parameter | ||
- last_where | ||
#- legacy_multiple | ||
#- legacy_objc_type # not suitable due to third party libs | ||
- let_var_whitespace | ||
- literal_expression_end_indentation | ||
- local_doc_comment | ||
- lower_acl_than_parent | ||
- missing_docs | ||
- modifier_order | ||
- multiline_arguments | ||
- multiline_arguments_brackets | ||
- multiline_function_chains | ||
- multiline_literal_brackets | ||
- multiline_parameters | ||
- multiline_parameters_brackets | ||
#- nimble_operator | ||
#- no_extension_access_modifier | ||
#- no_grouping_extension | ||
- no_magic_numbers | ||
- non_overridable_class_declaration | ||
- notification_center_detachment | ||
#- nslocalizedstring_key | ||
#- nslocalizedstring_require_bundle | ||
- number_separator | ||
#- object_literal | ||
- one_declaration_per_file # has been added to the source, but has not been released yet | ||
- opening_brace | ||
- operator_usage_whitespace | ||
- optional_enum_case_matching | ||
- overridden_super_call | ||
- override_in_extension | ||
- pattern_matching_keywords | ||
#- prefer_nimble | ||
- prefer_self_in_static_references | ||
- prefer_self_type_over_type_of_self | ||
- prefer_zero_over_explicit_init | ||
- prefixed_toplevel_constant | ||
- private_swiftui_state | ||
#- prohibited_interface_builder | ||
#- prohibited_super_call | ||
#- quick_discouraged_call | ||
#- quick_discouraged_focused_test | ||
#- quick_discouraged_pending_test | ||
#- raw_value_for_camel_cased_codable_enum | ||
- reduce_into | ||
- redundant_nil_coalescing | ||
- redundant_self_in_closure | ||
#- redundant_type_annotation | ||
#- required_deinit | ||
#- required_enum_case | ||
- return_value_from_void_function | ||
- self_binding | ||
- shorthand_argument # has been added to the source, but has not been released yet | ||
- shorthand_optional_binding | ||
- single_test_class | ||
#- sorted_enum_cases | ||
- sorted_first_last | ||
#- sorted_imports # see #1295 on github, conflicts with testable, also managed with swiftformat | ||
- static_operator | ||
- strict_fileprivate | ||
#- strong_iboutlet | ||
- superfluous_else | ||
- switch_case_on_newline | ||
- test_case_accessibility | ||
- toggle_bool | ||
- trailing_closure | ||
- type_contents_order | ||
- unavailable_function | ||
- unhandled_throwing_task | ||
- unneeded_parentheses_in_closure_argument | ||
- unowned_variable_capture | ||
- untyped_error_in_catch | ||
#- unused_capture_list # deprecated | ||
#- vertical_parameter_alignment_on_call | ||
#- vertical_whitespace_between_cases | ||
- vertical_whitespace_closing_braces | ||
- vertical_whitespace_opening_braces | ||
- weak_delegate | ||
- xct_specific_matcher | ||
- yoda_condition | ||
|
||
attributes: | ||
always_on_same_line: | ||
- "@IBSegueAction" | ||
- "@IBAction" | ||
- "@NSManaged" | ||
- "@objc" | ||
always_on_line_above: | ||
- "@discardableResult" | ||
|
||
force_cast: error | ||
|
||
force_try: error | ||
|
||
function_body_length: | ||
warning: 150 | ||
|
||
legacy_hashing: error | ||
|
||
identifier_name: | ||
min_length: 2 | ||
max_length: | ||
warning: 60 | ||
error: 80 | ||
excluded: | ||
- id | ||
|
||
multiline_arguments: | ||
first_argument_location: any_line | ||
only_enforce_after_first_closure_on_first_line: true | ||
|
||
number_separator: | ||
minimum_length: 5 | ||
|
||
overridden_super_call: | ||
excluded: | ||
- setUp() | ||
- setUpWithError() | ||
- tearDown() | ||
- tearDownWithError() | ||
|
||
private_over_fileprivate: | ||
validate_extensions: true | ||
|
||
trailing_whitespace: | ||
ignores_empty_lines: true | ||
ignores_comments: true | ||
|
||
type_name: | ||
min_length: 3 | ||
max_length: | ||
warning: 70 | ||
error: 80 | ||
allowed_symbols: | ||
- "_" | ||
|
||
trailing_closure: | ||
only_single_muted_parameter: true | ||
|
||
cyclomatic_complexity: | ||
ignores_case_statements: true | ||
|
||
function_parameter_count: | ||
warning: 6 | ||
error: 8 | ||
|
||
type_body_length: | ||
warning: 300 | ||
error: 400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.