Skip to content

Commit ecf76ed

Browse files
committed
Initial Commit πŸ³οΈβ€πŸŒˆ
0 parents  commit ecf76ed

18 files changed

+787
-0
lines changed

β€Ž.editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.{sh,swift-format,yaml}]
11+
indent_size = 2
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Pull request
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
soundness:
9+
name: Soundness
10+
uses: ./.github/workflows/soundness.yaml
11+
12+
unit_test:
13+
name: Unit Test
14+
uses: ./.github/workflows/unit-test.yaml

β€Ž.github/workflows/soundness.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Soundness
2+
on:
3+
workflow_call:
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}-soundness
6+
cancel-in-progress: true
7+
jobs:
8+
unacceptable-language-check:
9+
name: Unacceptable language check
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 1
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
- name: Run unacceptable language check
16+
run: ./scripts/check-unacceptable-language.sh
17+
18+
license-header-check:
19+
name: License headers check
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 1
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
- name: Run license header check
26+
run: ./scripts/check-license-headers.sh
27+
28+
format-check:
29+
name: Format check
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 5
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
- name: Install Swift
36+
uses: vapor/[email protected]
37+
with:
38+
toolchain: latest
39+
env:
40+
SWIFTLY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
- name: Run format check
42+
run: ./scripts/check-swift-format.sh

β€Ž.github/workflows/unit-test.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Unit Test
2+
on:
3+
workflow_call:
4+
push:
5+
branches: [main]
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}-unit-test
8+
cancel-in-progress: true
9+
jobs:
10+
unit-test:
11+
name: Unit Test
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
toolchain: [latest]
18+
steps:
19+
- name: Install Swift
20+
uses: vapor/[email protected]
21+
with:
22+
toolchain: ${{ matrix.toolchain }}
23+
env:
24+
SWIFTLY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Checkout
26+
uses: actions/[email protected]
27+
- name: Resolve Swift dependencies
28+
run: swift package resolve
29+
- name: Run Unit Tests
30+
run: swift test --parallel --enable-code-coverage

β€Ž.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
.build/
3+
.swiftpm/
4+
Package.resolved
5+
xcuserdata/
6+
*.xcodeproj/*
7+
!*.xcodeproj/project.pbxproj
8+
!*.xcodeproj/xcshareddata/
9+
!*.xcworkspace/contents.xcworkspacedata
10+
/*.gcno
11+
**/xcshareddata/WorkspaceSettings.xcsettings
12+
.vscode/

β€Ž.licenseignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.gitignore
2+
.licenseignore
3+
.unacceptablelanguageignore
4+
.swift-format
5+
.editorconfig
6+
*.md
7+
*.txt
8+
*.yaml
9+
Package.swift

β€Ž.swift-format

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"version" : 1,
3+
"indentation" : {
4+
"spaces" : 4
5+
},
6+
"tabWidth" : 4,
7+
"fileScopedDeclarationPrivacy" : {
8+
"accessLevel" : "private"
9+
},
10+
"spacesAroundRangeFormationOperators" : false,
11+
"indentConditionalCompilationBlocks" : false,
12+
"indentSwitchCaseLabels" : false,
13+
"lineBreakAroundMultilineExpressionChainComponents" : false,
14+
"lineBreakBeforeControlFlowKeywords" : false,
15+
"lineBreakBeforeEachArgument" : true,
16+
"lineBreakBeforeEachGenericRequirement" : true,
17+
"lineLength" : 120,
18+
"maximumBlankLines" : 1,
19+
"respectsExistingLineBreaks" : true,
20+
"prioritizeKeepingFunctionOutputTogether" : true,
21+
"rules" : {
22+
"AllPublicDeclarationsHaveDocumentation" : false,
23+
"AlwaysUseLiteralForEmptyCollectionInit" : false,
24+
"AlwaysUseLowerCamelCase" : false,
25+
"AmbiguousTrailingClosureOverload" : true,
26+
"BeginDocumentationCommentWithOneLineSummary" : false,
27+
"DoNotUseSemicolons" : true,
28+
"DontRepeatTypeInStaticProperties" : true,
29+
"FileScopedDeclarationPrivacy" : true,
30+
"FullyIndirectEnum" : true,
31+
"GroupNumericLiterals" : true,
32+
"IdentifiersMustBeASCII" : true,
33+
"NeverForceUnwrap" : false,
34+
"NeverUseForceTry" : false,
35+
"NeverUseImplicitlyUnwrappedOptionals" : false,
36+
"NoAccessLevelOnExtensionDeclaration" : true,
37+
"NoAssignmentInExpressions" : true,
38+
"NoBlockComments" : true,
39+
"NoCasesWithOnlyFallthrough" : true,
40+
"NoEmptyTrailingClosureParentheses" : true,
41+
"NoLabelsInCasePatterns" : true,
42+
"NoLeadingUnderscores" : false,
43+
"NoParensAroundConditions" : true,
44+
"NoVoidReturnOnFunctionSignature" : true,
45+
"OmitExplicitReturns" : true,
46+
"OneCasePerLine" : true,
47+
"OneVariableDeclarationPerLine" : true,
48+
"OnlyOneTrailingClosureArgument" : true,
49+
"OrderedImports" : true,
50+
"ReplaceForEachWithForLoop" : true,
51+
"ReturnVoidInsteadOfEmptyTuple" : true,
52+
"UseEarlyExits" : false,
53+
"UseExplicitNilCheckInConditions" : false,
54+
"UseLetInEveryBoundCaseVariable" : false,
55+
"UseShorthandTypeNames" : true,
56+
"UseSingleLinePropertyGetter" : false,
57+
"UseSynthesizedInitializer" : false,
58+
"UseTripleSlashForDocumentationComments" : true,
59+
"UseWhereClausesInForLoops" : false,
60+
"ValidateDocumentationComments" : false
61+
}
62+
}

β€Ž.unacceptablelanguageignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
scripts/check-unacceptable-language.sh

β€ŽCODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [[email protected]](mailto:[email protected]).
59+
All complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

0 commit comments

Comments
Β (0)