chore: enhance CI tests (#3344)

* chore: add swift linter

* chore: add clang linters

* chore: add kotlin linter

* chore(ci): update workflows

* chore(ci): clean workflows
This commit is contained in:
Krzysztof Moch
2023-12-02 15:58:43 +01:00
committed by GitHub
parent 26043335e1
commit 91d7135562
15 changed files with 271 additions and 3 deletions

25
ios/.clang-format Normal file
View File

@@ -0,0 +1,25 @@
# Config for clang-format version 16
# standard
BasedOnStyle: llvm
Standard: c++14
# Indentation
IndentWidth: 2
ColumnLimit: 140
# Includes
SortIncludes: true
SortUsingDeclarations: true
# Pointer and reference alignment
PointerAlignment: Left
ReferenceAlignment: Left
ReflowComments: true
# Line breaking options
BreakBeforeBraces: Attach
BreakConstructorInitializers: BeforeColon
AllowShortFunctionsOnASingleLine: Empty
IndentCaseLabels: true
NamespaceIndentation: Inner

13
ios/.swiftformat Normal file
View File

@@ -0,0 +1,13 @@
--allman false
--indent 2
--exclude Pods,Generated
--disable andOperator
--disable redundantReturn
--disable wrapMultilineStatementBraces
--disable organizeDeclarations
--disable redundantSelf
--enable markTypes
--enable isEmpty

51
ios/.swiftlint.yml Normal file
View File

@@ -0,0 +1,51 @@
disabled_rules:
- identifier_name
- trailing_comma
- todo
- type_body_length
- file_length
- cyclomatic_complexity
- function_body_length
opt_in_rules:
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- empty_collection_literal
- empty_count
- empty_string
- first_where
- flatmap_over_map_reduce
- last_where
- reduce_boolean
- reduce_into
- yoda_condition
- vertical_whitespace_opening_braces
- vertical_whitespace_closing_braces
- vertical_parameter_alignment_on_call
- untyped_error_in_catch
- unowned_variable_capture
- unavailable_function
- switch_case_on_newline
- static_operator
- strict_fileprivate
- sorted_imports
- sorted_first_last
- required_enum_case
- redundant_type_annotation
- redundant_nil_coalescing
- attributes
- convenience_type
analyzer_rules:
- explicit_self
- unused_declaration
- unused_import
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
# Adjust rule numbers
line_length: 160
# reporter type (xcode, json, csv, checkstyle, codeclimate, junit, html, emoji, sonarqube, markdown, github-actions-logging)
reporter: "xcode"