Skip to content

Commit 548338b

Browse files
committed
Add config files and fix gh action
1 parent ed7a697 commit 548338b

15 files changed

Lines changed: 628 additions & 531 deletions

.codecov.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://docs.codecov.io/docs/codecov-yaml
2+
3+
codecov:
4+
require_ci_to_pass: true
5+
6+
coverage:
7+
precision: 2
8+
round: down
9+
range: "70...100"
10+
ignore:
11+
- Sources/CCoreCrypto
12+
- Sources/CoreCrypto
13+
- Sources/ldid
14+
- Sources/ldid-core
15+
- Sources/minizip
16+
status:
17+
patch:
18+
default:
19+
if_no_uploads: error
20+
changes: true
21+
project:
22+
default:
23+
target: auto
24+
if_no_uploads: error
25+
comment: false

.editorconfig

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
charset = utf-8
8+
indent_size = 4
9+
end_of_line = lf
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
[*.{md,markdown}]
14+
trim_trailing_whitespace = false
15+
16+
[*.{c,h,m,mm}]
17+
trim_trailing_whitespace = true
18+
indent_style = space
19+
indent_size = 2
20+
21+
[*.js]
22+
indent_size = 2
23+
24+
[*.{swift}]
25+
trim_trailing_whitespace = true
26+
indent_style = tab
27+
indent_size = 4
28+
29+
[Makefile]
30+
trim_trailing_whitespace = true
31+
indent_style = tab
32+
indent_size = 8
33+
34+
[*.{yaml|yml}]
35+
indent_size = 2

.github/build.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/swiftlint.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: Build
6+
jobs:
7+
test:
8+
name: Build
9+
runs-on: macos-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@master
13+
- name: Test
14+
run: |
15+
swift build

.github/workflows/swiftlint.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Swift Lint
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/swiftlint.yml'
7+
- '.swiftlint.yml'
8+
- '**/*.swift'
9+
10+
jobs:
11+
swift-lint:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: GitHub Action for SwiftLint
17+
uses: norio-nomura/action-swiftlint@3.2.1
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
DIFF_BASE: ${{ github.base_ref }}

.jazzy.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ---- About ----
2+
module: AltSign
3+
module_version: 1.0.0
4+
author: SideStore Team
5+
readme: README.md
6+
copyright: 'See [license](https://github.com/SideStore/AltSign/blob/develop/LICENSE) for more details.'
7+
8+
# ---- URLs ----
9+
author_url: https://sidestore.io
10+
dash_url: https://sidestore.io/docsets/AltSign.xml
11+
github_url: https://github.com/SideStore/AltSign/
12+
github_file_prefix: https://github.com/SideStore/AltSign/tree/1.0.0/
13+
14+
# ---- Sources ----
15+
source_directory: Sources
16+
# documentation: .build/x86_64-apple-macosx/debug/AltSign.docc
17+
18+
# ---- Generation ----
19+
clean: true
20+
output: docs
21+
min_acl: public
22+
hide_documentation_coverage: false
23+
skip_undocumented: false
24+
objc: false
25+
swift_version: 5.1.0
26+
27+
# ---- Formatting ----
28+
theme: fullwidth

.swiftformat

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# .swiftformat
2+
3+
## file options
4+
5+
--exclude .build,.github,.swiftpm,.vscode,Configurations,Dependencies
6+
7+
## format options
8+
9+
--allman false
10+
--binarygrouping 4,8
11+
--commas always
12+
--comments indent
13+
--decimalgrouping 3,6
14+
--elseposition same-line
15+
--empty void
16+
--exponentcase lowercase
17+
--exponentgrouping disabled
18+
--fractiongrouping disabled
19+
--header ignore
20+
--hexgrouping 4,8
21+
--hexliteralcase uppercase
22+
--ifdef indent
23+
--importgrouping testable-bottom
24+
--indent 4
25+
--indentcase false
26+
--linebreaks lf
27+
--maxwidth none
28+
--octalgrouping 4,8
29+
--operatorfunc spaced
30+
--patternlet hoist
31+
--ranges spaced
32+
--self remove
33+
--semicolons inline
34+
--stripunusedargs always
35+
--swiftversion 5.1
36+
--trimwhitespace always
37+
--wraparguments preserve
38+
--wrapcollections preserve
39+
40+
## rules
41+
42+
--enable isEmpty,andOperator,assertionFailures

.swiftlint.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
disabled_rules:
2+
- block_based_kvo
3+
- colon
4+
- control_statement
5+
- cyclomatic_complexity
6+
- discarded_notification_center_observer
7+
- file_length
8+
- function_parameter_count
9+
- generic_type_name
10+
- identifier_name
11+
- multiple_closures_with_trailing_closure
12+
- nesting
13+
- switch_case_alignment
14+
- todo
15+
- type_name
16+
- type_body_length
17+
- function_body_length
18+
- unused_closure_parameter
19+
20+
# parameterized rules can be customized from this configuration file
21+
line_length: 200
22+
# parameterized rules are first parameterized as a warning level, then error level.
23+
type_body_length:
24+
- 300 # warning
25+
- 600 # error
26+
# parameterized rules are first parameterized as a warning level, then error level.
27+
# identifier_name_max_length:
28+
# - 40 # warning
29+
# - 60 # error
30+
# # parameterized rules are first parameterized as a warning level, then error level.
31+
# identifier_name_min_length:
32+
# - 3 # warning
33+
# - 2 # error
34+
function_body_length:
35+
- 200 # warning
36+
- 500 # error
37+
large_tuple:
38+
- 4 # warning
39+
- 6 # error
40+
41+
opt_in_rules:
42+
- empty_count
43+
- force_unwrapping
44+
45+
excluded: # paths to ignore during linting. overridden byincluded.
46+
- .build
47+
- .github
48+
- .swiftpm
49+
- .vscode
50+
- Dependencies
51+
52+
analyzer_rules: # Rules run by `swiftlint analyze` (experimental)
53+
- explicit_self
54+
55+
# Override these rules to be warnings for now
56+
force_cast: warning
57+
force_try: warning
58+
empty_count: warning
59+
60+
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit)
61+
62+
custom_rules:
63+
placeholders_in_comments:
64+
included: ".*\\.swift"
65+
name: "No Placeholders in Comments"
66+
regex: "<#([^#]+)#>"
67+
match_kinds:
68+
- comment
69+
- doccomment
70+
message: "Placeholder left in comment."
71+
tiles_deprecated:
72+
included: ".*\\.swift"
73+
name: "Tiles are deprecated in favor of Frame"
74+
regex: "([T,t]ile$|^[T,t]il[e,es])"
75+
message: "Tiles are deprecated in favor of Frame"
76+
severity: warning

0 commit comments

Comments
 (0)