-
Notifications
You must be signed in to change notification settings - Fork 390
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
506 changed files
with
9,054 additions
and
5,737 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,108 @@ | ||
# https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md | ||
# SwiftFormat config compliant with Google Swift Guideline | ||
# https://google.github.io/swift/#control-flow-statements | ||
|
||
# file options | ||
--exclude Pods | ||
# Specify version used in a project | ||
|
||
--swiftversion 5.9 | ||
|
||
# Rules explicitly required by the guideline | ||
|
||
--rules \ | ||
blankLinesAroundMark, \ | ||
blankLinesAtEndOfScope, \ | ||
blankLinesAtStartOfScope, \ | ||
blankLinesBetweenScopes, \ | ||
braces, \ | ||
consecutiveBlankLines, \ | ||
consecutiveSpaces, \ | ||
duplicateImports, \ | ||
elseOnSameLine, \ | ||
emptyBraces, \ | ||
enumNamespaces, \ | ||
extensionAccessControl, \ | ||
hoistPatternLet, \ | ||
indent, \ | ||
leadingDelimiters, \ | ||
linebreakAtEndOfFile, \ | ||
markTypes, \ | ||
organizeDeclarations, \ | ||
redundantInit, \ | ||
redundantParens, \ | ||
redundantPattern, \ | ||
redundantRawValues, \ | ||
redundantType, \ | ||
redundantVoidReturnType, \ | ||
semicolons, \ | ||
sortImports, \ | ||
sortSwitchCases, \ | ||
spaceAroundBraces, \ | ||
spaceAroundBrackets, \ | ||
spaceAroundComments, \ | ||
spaceAroundGenerics, \ | ||
spaceAroundOperators, \ | ||
spaceAroundParens, \ | ||
spaceInsideBraces, \ | ||
spaceInsideBrackets, \ | ||
spaceInsideComments, \ | ||
spaceInsideGenerics, \ | ||
spaceInsideParens, \ | ||
todos, \ | ||
trailingClosures, \ | ||
trailingCommas, \ | ||
trailingSpace, \ | ||
typeSugar, \ | ||
void, \ | ||
wrap, \ | ||
wrapArguments, \ | ||
wrapAttributes, \ | ||
# | ||
# | ||
# Additional rules not mentioned in the guideline, but helping to keep the codebase clean | ||
# Quoting the guideline: | ||
# Common themes among the rules in this section are: | ||
# avoid redundancy, avoid ambiguity, and prefer implicitness over explicitness | ||
# unless being explicit improves readability and/or reduces ambiguity. | ||
# | ||
# | ||
andOperator, \ | ||
isEmpty, \ | ||
redundantBackticks, \ | ||
redundantBreak, \ | ||
redundantExtensionACL, \ | ||
redundantGet, \ | ||
redundantLetError, \ | ||
redundantNilInit, \ | ||
redundantObjc, \ | ||
redundantReturn, \ | ||
redundantSelf, \ | ||
strongifiedSelf | ||
|
||
|
||
# Options for basic rules | ||
|
||
--extensionacl on-declarations | ||
--funcattributes prev-line | ||
--indent 4 | ||
--maxwidth 120 | ||
--typeattributes prev-line | ||
--varattributes same-line | ||
--voidtype tuple | ||
--wraparguments before-first | ||
--wrapparameters before-first | ||
--wrapcollections before-first | ||
--wrapreturntype if-multiline | ||
--wrapconditions after-first | ||
|
||
# Option for additional rules | ||
|
||
--self init-only | ||
|
||
# Excluded folders | ||
|
||
--exclude Pods,**/UNTESTED_TODO,vendor,fastlane | ||
|
||
# https://github.com/NoemiRozpara/Google-SwiftFormat-Config | ||
|
||
# Following is by Lava | ||
|
||
--ifdef no-indent |
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,71 @@ | ||
# | ||
# Copyright (c) 2019 Google Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
disabled_rules: | ||
- multiple_closures_with_trailing_closure | ||
- nesting | ||
- void_return | ||
- shorthand_operator | ||
- cyclomatic_complexity | ||
- force_cast | ||
- force_try | ||
- large_tuple | ||
|
||
opt_in_rules: | ||
- convenience_type | ||
# - no_magic_numbers | ||
# - force_unwrapping | ||
|
||
line_length: | ||
warning: 120 | ||
ignores_comments: true | ||
function_body_length: | ||
warning: 120 | ||
error: 400 | ||
type_body_length: | ||
warning: 500 | ||
error: 1200 | ||
file_length: | ||
warning: 900 | ||
error: 1600 | ||
type_name: | ||
min_length: 3 | ||
max_length: | ||
warning: 50 | ||
error: 50 | ||
identifier_name: | ||
min_length: 3 | ||
excluded: # excluded via string array | ||
- id | ||
- URL | ||
- url | ||
- x | ||
- y | ||
- i | ||
- j | ||
- Defaults # Make use of `SwiftyUserDefaults` | ||
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji) | ||
trailing_comma: | ||
severity: warning | ||
mandatory_comma: true | ||
|
||
excluded: | ||
- "Build/*" | ||
- "Pods" | ||
- "**/UNTESTED_TODO" | ||
- "vendor" | ||
- "fastlane" | ||
- ".build" |
Oops, something went wrong.