-
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
0 parents
commit 4537a73
Showing
737 changed files
with
25,007 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Deploy DocC | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: macOS-14 | ||
|
||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Init | ||
run: | | ||
make init | ||
- name: Build DocC | ||
run: | | ||
make doc_build | ||
- name: Export DocC | ||
run: | | ||
make doc_export | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: 'docs' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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,55 @@ | ||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData/ | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
*.xcodeproj | ||
*.gcno | ||
*.xcscmblueprint | ||
build_logs/ | ||
|
||
# CocoaPods | ||
# | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control | ||
# | ||
Pods/ | ||
Podfile.lock | ||
|
||
# Exported environment variables for XcodeCoverage | ||
env.sh | ||
|
||
# OS X Finder stuff | ||
.DS_Store | ||
|
||
# Fastlane Stuff | ||
fastlane/local_config.sh | ||
fastlane/test_output | ||
fastlane/Provisioning | ||
fastlane/Build | ||
fastlane/report.xml | ||
buildData | ||
|
||
# Bundler | ||
.bundle/ | ||
Gemfile.lock | ||
|
||
# JSCPD | ||
report/ | ||
node_modules/ | ||
package-lock.json | ||
Package.resolved |
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.7.6 |
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,104 @@ | ||
# SwiftFormat configuration file | ||
|
||
# Rules | ||
--rules \ | ||
acronyms, \ | ||
andOperator, \ | ||
anyObjectProtocol, \ | ||
applicationMain, \ | ||
assertionFailures, \ | ||
blankLineAfterImports, \ | ||
blankLinesAroundMark, \ | ||
blankLinesBetweenChainedFunctions, \ | ||
blankLinesBetweenImports, \ | ||
blankLinesBetweenScopes, \ | ||
blockComments, \ | ||
braces, \ | ||
conditionalAssignment, \ | ||
consecutiveBlankLines, \ | ||
consecutiveSpaces, \ | ||
consistentSwitchCaseSpacing, \ | ||
duplicateImports, \ | ||
elseOnSameLine, \ | ||
emptyBraces, \ | ||
extensionAccessControl, \ | ||
fileHeader, \ | ||
hoistPatternLet, \ | ||
initCoderUnavailable, \ | ||
isEmpty, \ | ||
leadingDelimiters, \ | ||
linebreakAtEndOfFile, \ | ||
modifierOrder, \ | ||
numberFormatting, \ | ||
opaqueGenericParameters, \ | ||
redundantBackticks, \ | ||
redundantBreak, \ | ||
redundantClosure, \ | ||
redundantExtensionACL, \ | ||
redundantFileprivate, \ | ||
redundantGet, \ | ||
redundantInit, \ | ||
redundantInternal, \ | ||
redundantLet, \ | ||
redundantLetError, \ | ||
redundantNilInit, \ | ||
redundantObjc, \ | ||
redundantOptionalBinding, \ | ||
redundantParens, \ | ||
redundantPattern, \ | ||
redundantProperty, \ | ||
redundantRawValues, \ | ||
redundantStaticSelf, \ | ||
redundantType, \ | ||
redundantVoidReturnType, \ | ||
semicolons, \ | ||
sortImports, \ | ||
spaceAroundBraces, \ | ||
spaceAroundBrackets, \ | ||
spaceAroundComments, \ | ||
spaceAroundGenerics, \ | ||
spaceAroundOperators, \ | ||
spaceAroundParens, \ | ||
spaceInsideBraces, \ | ||
spaceInsideBrackets, \ | ||
spaceInsideComments, \ | ||
spaceInsideGenerics, \ | ||
spaceInsideParens, \ | ||
strongifiedSelf, \ | ||
todos, \ | ||
trailingClosures, \ | ||
trailingSpace, \ | ||
typeSugar, \ | ||
unusedArguments, \ | ||
void, \ | ||
wrapConditionalBodies, \ | ||
wrapLoopBodies, \ | ||
wrapSingleLineComments, \ | ||
yodaConditions | ||
|
||
# Options | ||
--swiftversion 5.9 | ||
|
||
--redundanttype inferred | ||
|
||
--importgrouping testable-last | ||
|
||
--ranges no-space | ||
|
||
--patternlet inline | ||
|
||
--header \n Copyright © Surf. All rights reserved.\n | ||
|
||
# Excludes | ||
# | ||
# As for not .swift files: | ||
# | ||
# We don't specify files to exclude; | ||
# Instead, we configure the runner script the way it checks only swift files | ||
# That have changed from last commit | ||
# | ||
# As for .swift file: | ||
# | ||
# We don't want to change generated file and docs files | ||
# We prefer to leave them as is. | ||
--exclude Modules/Core/Resources/Sources/Resources/**/*.swift,Modules/App/Playbook/Documentation,Modules/App/Example/Documentation |
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,182 @@ | ||
only_rules: | ||
- attributes | ||
- class_delegate_protocol | ||
- closing_brace | ||
- closure_parameter_position | ||
- closure_spacing | ||
- collection_alignment | ||
- colon | ||
- comma | ||
- comment_spacing | ||
- computed_accessors_order | ||
- conditional_returns_on_newline | ||
- convenience_type | ||
- contains_over_filter_count | ||
- contains_over_first_not_nil | ||
- contains_over_range_nil_comparison | ||
- control_statement | ||
- custom_rules | ||
- cyclomatic_complexity | ||
- discouraged_direct_init | ||
- duplicate_imports | ||
- empty_collection_literal | ||
- empty_count | ||
- empty_parameters | ||
- empty_parentheses_with_trailing_closure | ||
- empty_string | ||
- explicit_init | ||
- file_length | ||
- first_where | ||
- for_where | ||
- force_cast | ||
- force_try | ||
- force_unwrapping | ||
- function_parameter_count | ||
- identical_operands | ||
- implicit_getter | ||
- implicitly_unwrapped_optional | ||
- last_where | ||
- leading_whitespace | ||
- legacy_cggeometry_functions | ||
- legacy_constant | ||
- legacy_constructor | ||
- legacy_hashing | ||
- legacy_nsgeometry_functions | ||
- line_length | ||
- literal_expression_end_indentation | ||
- mark | ||
- multiline_arguments | ||
- no_space_in_method_call | ||
- opening_brace | ||
- operator_usage_whitespace | ||
- operator_whitespace | ||
- prefer_zero_over_explicit_init | ||
- protocol_property_accessors_order | ||
- reduce_boolean | ||
- redundant_discardable_let | ||
- redundant_nil_coalescing | ||
- redundant_optional_initialization | ||
- redundant_string_enum_value | ||
- redundant_type_annotation | ||
- redundant_void_return | ||
- return_arrow_whitespace | ||
- shorthand_operator | ||
- statement_position | ||
- superfluous_else | ||
- switch_case_alignment | ||
- syntactic_sugar | ||
- todo | ||
- trailing_comma | ||
- trailing_newline | ||
- trailing_semicolon | ||
- trailing_whitespace | ||
- toggle_bool | ||
- unneeded_break_in_switch | ||
- unused_import | ||
- unused_optional_binding | ||
- unused_setter_value | ||
- vertical_parameter_alignment | ||
- vertical_parameter_alignment_on_call | ||
- vertical_whitespace | ||
- void_function_in_ternary | ||
- void_return | ||
- yoda_condition | ||
|
||
disabled_rules: # rule identifiers to exclude from running | ||
|
||
opt_in_rules: # some rules are only opt-in | ||
|
||
excluded: # paths to ignore during linting. Takes precedence over `included`. | ||
- fastlane | ||
- .bundle | ||
- .swiftpm | ||
- .build | ||
- buildData | ||
- UnitTests | ||
- Modules/App/Playbook/Documentation | ||
- Modules/App/Example/Documentation | ||
|
||
custom_rules: | ||
image_name_initialization: # Disable UIImage init from name | ||
included: ".*.swift" | ||
name: "Image initialization" | ||
regex: 'UIImage\(named:[^)]+\)' | ||
message: "Use UIImage(assetName: ) instead" | ||
severity: error | ||
|
||
realm_in_ui: | ||
included: "Screens/.*.swift|User Stories/.*.swift" | ||
name: "Realm can be used only in services" | ||
regex: "Realm" | ||
message: "Realm can be used only in serivces" | ||
severity: error | ||
|
||
router_protocol_error: | ||
included: ".*RouterInput.swift" | ||
name: "View in Router protocol" | ||
regex: "view|View" | ||
message: "Router protocol methods should contains `Module` instead `View`" | ||
severity: error | ||
|
||
open_iboutlets: | ||
included: ".*.swift" | ||
name: "IBOutlet opening" | ||
regex: "@IBOutlet ?(weak){0,1} var" | ||
message: "IBOutlet should be private or fileprivate" | ||
severity: error | ||
|
||
mark_newlines: | ||
included: ".*.swift" | ||
name: "MARK newlines surrounding" | ||
regex: '(([}{)\w \t]+\n{1}[ \t]*)(\/\/ MARK: - [\w ]*))|((\/\/ MARK: - [\w ]*)(\n{1}[ \t]*\w+))' | ||
message: "Every MARK should be surrounded with 1 newline before and 1 after it" | ||
severity: warning | ||
|
||
class_modificators_order: | ||
include: ".*.swift" | ||
name: "Class modificators order" | ||
regex: "final (public|private|open)" | ||
message: "Modificator should precede keyword final" | ||
|
||
func_modificators_order: | ||
include: ".*.swift" | ||
name: "Func modificators order" | ||
regex: "(static|class) (public|private|open) func" | ||
message: "Modificator should precede keyword static or class" | ||
|
||
subclass_func_modificator_order: | ||
include: ".*.swift" | ||
name: "Subclass func modificators order" | ||
regex: "(public|private|open) override func" | ||
message: "Keyword override should precede modificator" | ||
|
||
swiftgen_fonts: | ||
name: "SwiftGen Fonts" | ||
regex: 'UIFont(\.init)?\(name: ?"?.+"?, ?size:.+?\)' | ||
message: "Use FontFamily.<family>.<variant>.size(<size>) instead" | ||
severity: error | ||
|
||
swiftgen_assets: | ||
name: "SwiftGen Assets" | ||
regex: '(UIImage|UIColor)(\.init)?\(named: ?"?.+"?(, ?in:.+?, ?compatibleWith:.+?)?\)|#imageLiteral\(resourceName: ?".+"\)' | ||
message: "Use Asset.<asset> instead" | ||
severity: error | ||
|
||
swiftgen_colors: | ||
name: "SwiftGen Colors" | ||
regex: '(UIColor(\.init)?|#colorLiteral)\(((red|displayP3Red):.+?,green:.+?,blue:.+?,alpha:.+?)|(white:.+?,alpha:.+?)|(hue:.+?,saturation:.+?,brightness:.+?,alpha:.+?)\)' | ||
message: "Use ColorName.<color> instead" | ||
severity: error | ||
|
||
big_conditional_returns_on_newline: | ||
name: "Conditional Returns on Newline" | ||
message: "Conditional statements should always return on the next line" | ||
regex: '(guard|if)[^\n]{40,}return' | ||
|
||
line_length: 120 | ||
|
||
file_length: | ||
warning: 600 | ||
error: 1200 | ||
|
||
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit) |
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,3 @@ | ||
brew "xclogparser" | ||
brew "swiftgen" | ||
brew "xcodegen" |
Oops, something went wrong.