Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Apr 30, 2024
2 parents e5ce53b + c8f8c5c commit 540a35e
Show file tree
Hide file tree
Showing 506 changed files with 9,054 additions and 5,737 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/cn_feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 功能建议
description: 功能建议
title: "🚀 功能建议:{{请填写标题,不要留空}}"
title: "🚀 功能建议:请填写标题,不要留空"
labels: ["enhancement"]

body:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/en_feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Feature request
description: Request a new feature
title: "🚀 Feature Request: {{Please fill in the title, don't leave it blank}}"
title: "🚀 Feature Request: Please fill in the title, don't leave it blank"
labels: ["enhancement"]

body:
Expand Down
21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/others.md

This file was deleted.

110 changes: 107 additions & 3 deletions .swiftformat
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
71 changes: 71 additions & 0 deletions .swiftlint.yml
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"
Loading

0 comments on commit 540a35e

Please sign in to comment.