Skip to content

Commit 4fde542

Browse files
authored
Merge pull request #1 from AsyncCommunity/feature/first-set-of-extensions
project: first set of extensions
2 parents 95979c3 + 39ce2cc commit 4fde542

51 files changed

Lines changed: 4633 additions & 20 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: bug
6+
assignees: twittemb
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
Provide code snippets, or links to gist or repos if possible.
21+
22+
**Expected behavior**
23+
A clear and concise description of what you expected to happen.
24+
25+
**Screenshots**
26+
If applicable, add screenshots to help explain your problem.
27+
28+
**Environment:**
29+
- Version of the library
30+
31+
**Additional context**
32+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[FEATURE REQUEST]"
5+
labels: enhancement
6+
assignees: twittemb
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
iOS:
7+
name: "iOS"
8+
runs-on: macos-11
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Generate Xcode project
12+
run: swift package generate-xcodeproj
13+
- name: Run Unit Tests
14+
run: set -o pipefail && xcodebuild -project AsyncExtensions.xcodeproj -scheme AsyncExtensions-Package -enableCodeCoverage YES -sdk iphonesimulator -destination "name=iPhone 13" test | xcpretty -c -r html --output logs/iOS.html
15+
- name: Upload code coverage to Codecov.io
16+
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_IO_TOKEN }}
17+
- name: Upload build artifacts to Github
18+
uses: actions/upload-artifact@v1
19+
with:
20+
name: build-logs-${{ github.run_id }}
21+
path: logs
22+
macOS:
23+
name: "macOS"
24+
runs-on: macos-11
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Generate Xcode project
28+
run: swift package generate-xcodeproj
29+
- name: Run Unit Tests
30+
run: set -o pipefail && xcodebuild -project AsyncExtensions.xcodeproj -scheme AsyncExtensions-Package -enableCodeCoverage NO -sdk macosx -destination "arch=x86_64" test | xcpretty -c -r html --output logs/macOS.html
31+
- name: Upload build artifacts to Github
32+
uses: actions/upload-artifact@v1
33+
with:
34+
name: build-logs-${{ github.run_id }}
35+
path: logs
36+
tvOS:
37+
name: "tvOS"
38+
runs-on: macos-11
39+
steps:
40+
- uses: actions/checkout@v2
41+
- name: Generate Xcode project
42+
run: swift package generate-xcodeproj
43+
- name: Run Unit Tests
44+
run: set -o pipefail && xcodebuild -project AsyncExtensions.xcodeproj -scheme AsyncExtensions-Package -enableCodeCoverage NO -sdk appletvsimulator -destination "name=Apple TV" test | xcpretty -c -r html --output logs/tvOS.html
45+
- name: Upload build artifacts to Github
46+
uses: actions/upload-artifact@v1
47+
with:
48+
name: build-logs-${{ github.run_id }}
49+
path: logs

.github/workflows/swiftlint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: SwiftLint
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/swiftlint.yml'
7+
- '.swiftlint.yml'
8+
- 'Sources/**/*.swift'
9+
10+
jobs:
11+
SwiftLint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: GitHub Action for SwiftLint
16+
uses: norio-nomura/action-swiftlint@3.0.1

.swiftlint.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
included:
2+
- Sources
3+
excluded:
4+
- Tests
5+
analyzer_rules:
6+
disabled_rules:
7+
- large_tuple
8+
- unused_declaration
9+
- generic_type_name
10+
- nesting
11+
- lower_acl_than_parent
12+
opt_in_rules:
13+
- anyobject_protocol
14+
- array_init
15+
- attributes
16+
- closure_end_indentation
17+
- closure_spacing
18+
- collection_alignment
19+
- contains_over_filter_count
20+
- contains_over_filter_is_empty
21+
- contains_over_first_not_nil
22+
- discouraged_object_literal
23+
- empty_count
24+
- empty_string
25+
- empty_xctest_method
26+
- explicit_init
27+
- extension_access_modifier
28+
- fallthrough
29+
- file_header
30+
- file_name
31+
- first_where
32+
- flatmap_over_map_reduce
33+
- identical_operands
34+
- joined_default_parameter
35+
- legacy_random
36+
- let_var_whitespace
37+
- last_where
38+
- literal_expression_end_indentation
39+
- lower_acl_than_parent
40+
- modifier_order
41+
- nimble_operator
42+
- nslocalizedstring_key
43+
- number_separator
44+
- object_literal
45+
- operator_usage_whitespace
46+
- overridden_super_call
47+
- override_in_extension
48+
- pattern_matching_keywords
49+
- private_action
50+
- private_outlet
51+
- prohibited_interface_builder
52+
- prohibited_super_call
53+
- quick_discouraged_call
54+
- quick_discouraged_focused_test
55+
- quick_discouraged_pending_test
56+
- reduce_into
57+
- redundant_nil_coalescing
58+
- redundant_type_annotation
59+
- single_test_class
60+
- sorted_first_last
61+
- sorted_imports
62+
- static_operator
63+
- strong_iboutlet
64+
- toggle_bool
65+
- unavailable_function
66+
- unneeded_parentheses_in_closure_argument
67+
- unowned_variable_capture
68+
- untyped_error_in_catch
69+
- vertical_parameter_alignment_on_call
70+
- vertical_whitespace_closing_braces
71+
- vertical_whitespace_opening_braces
72+
- xct_specific_matcher
73+
- yoda_condition
74+
75+
line_length: 150
76+
77+
# configurable rules can be customized from this configuration file
78+
# binary rules can set their severity level
79+
force_cast: warning # implicitly
80+
force_try:
81+
severity: warning # explicitly
82+
83+
identifier_name:
84+
excluded:
85+
- id
86+
number_separator:
87+
minimum_length: 5
88+
file_name:
89+
excluded:
90+
- main.swift
91+
- LinuxMain.swift
92+
- TestHelpers.swift
93+
- shim.swift
94+
- AutomaticRuleTests.generated.swift
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1320"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "AsyncExtensions"
18+
BuildableName = "AsyncExtensions"
19+
BlueprintName = "AsyncExtensions"
20+
ReferencedContainer = "container:">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "NO"
27+
buildForArchiving = "NO"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "AsyncExtensionsTests"
32+
BuildableName = "AsyncExtensionsTests"
33+
BlueprintName = "AsyncExtensionsTests"
34+
ReferencedContainer = "container:">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
buildConfiguration = "Debug"
41+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
42+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43+
shouldUseLaunchSchemeArgsEnv = "YES"
44+
codeCoverageEnabled = "YES">
45+
<CodeCoverageTargets>
46+
<BuildableReference
47+
BuildableIdentifier = "primary"
48+
BlueprintIdentifier = "AsyncExtensions"
49+
BuildableName = "AsyncExtensions"
50+
BlueprintName = "AsyncExtensions"
51+
ReferencedContainer = "container:">
52+
</BuildableReference>
53+
</CodeCoverageTargets>
54+
<Testables>
55+
<TestableReference
56+
skipped = "NO">
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "AsyncExtensionsTests"
60+
BuildableName = "AsyncExtensionsTests"
61+
BlueprintName = "AsyncExtensionsTests"
62+
ReferencedContainer = "container:">
63+
</BuildableReference>
64+
</TestableReference>
65+
</Testables>
66+
</TestAction>
67+
<LaunchAction
68+
buildConfiguration = "Debug"
69+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
70+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
71+
launchStyle = "0"
72+
useCustomWorkingDirectory = "NO"
73+
ignoresPersistentStateOnLaunch = "NO"
74+
debugDocumentVersioning = "YES"
75+
debugServiceExtension = "internal"
76+
allowLocationSimulation = "YES">
77+
</LaunchAction>
78+
<ProfileAction
79+
buildConfiguration = "Release"
80+
shouldUseLaunchSchemeArgsEnv = "YES"
81+
savedToolIdentifier = ""
82+
useCustomWorkingDirectory = "NO"
83+
debugDocumentVersioning = "YES">
84+
<MacroExpansion>
85+
<BuildableReference
86+
BuildableIdentifier = "primary"
87+
BlueprintIdentifier = "AsyncExtensions"
88+
BuildableName = "AsyncExtensions"
89+
BlueprintName = "AsyncExtensions"
90+
ReferencedContainer = "container:">
91+
</BuildableReference>
92+
</MacroExpansion>
93+
</ProfileAction>
94+
<AnalyzeAction
95+
buildConfiguration = "Debug">
96+
</AnalyzeAction>
97+
<ArchiveAction
98+
buildConfiguration = "Release"
99+
revealArchiveInOrganizer = "YES">
100+
</ArchiveAction>
101+
</Scheme>

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**v0.1.0 - Hydrogen:**
2+
3+
- Implements the first set of extensions

CODE_OF_CONDUCT.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of
4+
fostering an open and welcoming community, we pledge to respect all people who
5+
contribute through reporting issues, posting feature requests, updating
6+
documentation, submitting pull requests or patches, and other activities.
7+
8+
We are committed to making participation in this project a harassment-free
9+
experience for everyone, regardless of level of experience, gender, gender
10+
identity and expression, sexual orientation, disability, personal appearance,
11+
body size, race, ethnicity, age, religion, or nationality.
12+
13+
Examples of unacceptable behavior by participants include:
14+
15+
* The use of sexualized language or imagery
16+
* Personal attacks
17+
* Trolling or insulting/derogatory comments
18+
* Public or private harassment
19+
* Publishing other's private information, such as physical or electronic addresses,
20+
without explicit permission
21+
* Other unethical or unprofessional conduct
22+
23+
Project maintainers have the right and responsibility to remove, edit, or
24+
reject comments, commits, code, wiki edits, issues, and other contributions
25+
that are not aligned to this Code of Conduct, or to ban temporarily or
26+
permanently any contributor for other behaviors that they deem inappropriate,
27+
threatening, offensive, or harmful.
28+
29+
By adopting this Code of Conduct, project maintainers commit themselves to
30+
fairly and consistently applying these principles to every aspect of managing
31+
this project. Project maintainers who do not follow or enforce the Code of
32+
Conduct may be permanently removed from the project team.
33+
34+
This code of conduct applies both within project spaces and in public spaces
35+
when an individual is representing the project or its community.
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
38+
reported by contacting a project maintainer at **thibault.wittemberg@gmail.com**. All
39+
complaints will be reviewed and investigated and will result in a response that
40+
is deemed necessary and appropriate to the circumstances. Maintainers are
41+
obligated to maintain confidentiality with regard to the reporter of an
42+
incident.
43+
44+
This Code of Conduct is adapted from the Contributor Covenant,
45+
version 1.3.0, available at [http://contributor-covenant.org/version/1/3/0/](http://contributor-covenant.org/version/1/3/0/)

PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Description
2+
<!--- Describe your changes in detail, link the related issues -->
3+
4+
## Checklist
5+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
6+
- [ ] this PR is based on the **main** branch and is up-to-date, if not please rebase your branch on the top of **main**
7+
- [ ] the commits inside this PR have explicit commit messages
8+
- [ ] unit tests cover the new feature or the bug fix
9+
- [ ] the feature is documented in the README.md if it makes sense
10+
- [ ] the CHANGELOG is up-to-date

0 commit comments

Comments
 (0)