Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hallee authored Jan 25, 2024
0 parents commit a64f55b
Show file tree
Hide file tree
Showing 10 changed files with 189 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 2
indent_style = tab

[*.{json,yml}]
indent_style = space
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.podspec linguist-vendored
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint & Test

on:
pull_request:

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Swift build
uses: actions/cache@v3
with:
path: .build
key: ${{ runner.os }}-build
- name: Run Swift tests
run: swift test
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
Packages/
Package.pins
Package.resolved
*.xcodeproj

# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
.swiftpm

.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Accio dependency management
Dependencies/
.accio/
50 changes: 50 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
disabled_rules:
- closure_parameter_position
- identifier_name
- multiple_closures_with_trailing_closure
opt_in_rules:
- attributes
- closure_end_indentation
- closure_parameter_position
- closure_spacing
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- convenience_type
- empty_count
- empty_string
- explicit_init
- fallthrough
- first_where
- flatmap_over_map_reduce
- indentation_width
- legacy_random
- literal_expression_end_indentation
- lower_acl_than_parent
- operator_usage_whitespace
- redundant_nil_coalescing
- redundant_type_annotation
- sorted_first_last
- sorted_imports
- static_operator
- toggle_bool
- unavailable_function
- unneeded_parentheses_in_closure_argument
- untyped_error_in_catch
- vertical_parameter_alignment_on_call
- yoda_condition
indentation_width:
include_comments: false
line_length:
ignores_urls: true
ignores_comments: true
ignores_interpolated_strings: true
function_body_length:
warning: 100
type_body_length:
warning: 300
error: 400
cyclomatic_complexity:
ignores_case_statements: true
indentation: tabs
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Pixel Foundry, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 13 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// swift-tools-version:5.8
import PackageDescription

let package = Package(
name: "SwiftPackage",
products: [
.library(name: "SwiftPackage", targets: ["SwiftPackage"])
],
targets: [
.target(name: "SwiftPackage"),
.testTarget(name: "Tests", dependencies: ["SwiftPackage"])
]
)
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Swift Package Repository Template

This is a project template for Swift packages.

* Sensible `.gitignore`
* `.swiftlint.yml` for linting
* `.editorconfig` enforcing tabs with a size of 2.
1 change: 1 addition & 0 deletions Sources/SwiftPackage/SwiftPackage.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

6 changes: 6 additions & 0 deletions Sources/Tests/Tests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@testable import SwiftPackage
import XCTest

class Tests: XCTestCase {

}

0 comments on commit a64f55b

Please sign in to comment.