Skip to content

Commit fbfe87c

Browse files
authored
Initial commit
0 parents  commit fbfe87c

File tree

10 files changed

+192
-0
lines changed

10 files changed

+192
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_size = 2
9+
indent_style = tab
10+
11+
[*.{json,yml}]
12+
indent_style = space

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
*.podspec linguist-vendored

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint & Test
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
SwiftLint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: SwiftLint
12+
uses: norio-nomura/[email protected]
13+
Test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Cache Swift build
18+
uses: actions/cache@v3
19+
with:
20+
path: .build
21+
key: ${{ runner.os }}-build
22+
- name: Run Swift tests
23+
run: swift test

.gitignore

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## User settings
6+
xcuserdata/
7+
8+
## Obj-C/Swift specific
9+
*.hmap
10+
11+
## App packaging
12+
*.ipa
13+
*.dSYM.zip
14+
*.dSYM
15+
16+
## Playgrounds
17+
timeline.xctimeline
18+
playground.xcworkspace
19+
20+
# Swift Package Manager
21+
#
22+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
23+
Packages/
24+
Package.pins
25+
Package.resolved
26+
*.xcodeproj
27+
28+
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
29+
# hence it is not needed unless you have added a package configuration file to your project
30+
.swiftpm
31+
32+
.build/
33+
34+
# CocoaPods
35+
#
36+
# We recommend against adding the Pods directory to your .gitignore. However
37+
# you should judge for yourself, the pros and cons are mentioned at:
38+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
39+
#
40+
# Pods/
41+
#
42+
# Add this line if you want to avoid checking in source code from the Xcode workspace
43+
# *.xcworkspace
44+
45+
# Carthage
46+
#
47+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
48+
# Carthage/Checkouts
49+
50+
Carthage/Build/
51+
52+
# Accio dependency management
53+
Dependencies/
54+
.accio/

.swiftlint.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
disabled_rules:
2+
- closure_parameter_position
3+
- identifier_name
4+
- multiple_closures_with_trailing_closure
5+
opt_in_rules:
6+
- attributes
7+
- closure_end_indentation
8+
- closure_parameter_position
9+
- closure_spacing
10+
- contains_over_filter_count
11+
- contains_over_filter_is_empty
12+
- contains_over_first_not_nil
13+
- contains_over_range_nil_comparison
14+
- convenience_type
15+
- empty_count
16+
- empty_string
17+
- explicit_init
18+
- fallthrough
19+
- first_where
20+
- flatmap_over_map_reduce
21+
- indentation_width
22+
- legacy_random
23+
- literal_expression_end_indentation
24+
- lower_acl_than_parent
25+
- operator_usage_whitespace
26+
- redundant_nil_coalescing
27+
- redundant_type_annotation
28+
- sorted_first_last
29+
- sorted_imports
30+
- static_operator
31+
- toggle_bool
32+
- unavailable_function
33+
- unneeded_parentheses_in_closure_argument
34+
- untyped_error_in_catch
35+
- vertical_parameter_alignment_on_call
36+
- yoda_condition
37+
excluded:
38+
- .build
39+
- .swiftpm
40+
indentation_width:
41+
include_comments: false
42+
line_length:
43+
ignores_urls: true
44+
ignores_comments: true
45+
ignores_interpolated_strings: true
46+
function_body_length:
47+
warning: 100
48+
type_body_length:
49+
warning: 300
50+
error: 400
51+
cyclomatic_complexity:
52+
ignores_case_statements: true
53+
indentation: tabs

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Pixel Foundry, LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Package.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// swift-tools-version:5.8
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "SwiftPackage",
6+
products: [
7+
.library(name: "SwiftPackage", targets: ["SwiftPackage"])
8+
],
9+
targets: [
10+
.target(name: "SwiftPackage"),
11+
.testTarget(name: "Tests", dependencies: ["SwiftPackage"])
12+
]
13+
)

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Swift Package Repository Template
2+
3+
This is a project template for Swift packages.
4+
5+
* Sensible `.gitignore`
6+
* `.swiftlint.yml` for linting
7+
* `.editorconfig` enforcing tabs with a size of 2.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Sources/Tests/Tests.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@testable import SwiftPackage
2+
import XCTest
3+
4+
class Tests: XCTestCase {
5+
6+
}

0 commit comments

Comments
 (0)