-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from reddavis/feature/equatable
If Value is equatable, make the wrapper equatable
- Loading branch information
Showing
17 changed files
with
304 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: reddavis | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
ios-latest: | ||
name: Unit Test - iOS 15.2, Xcode 13.2 | ||
runs-on: macOS-11 | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_13.2.app/Contents/Developer | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run Tests | ||
run: Scripts/test -d "OS=15.2,name=iPhone 13 Pro" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: SwiftLint | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/swiftlint.yml' | ||
- '.swiftlint.yml' | ||
- '**/*.swift' | ||
|
||
jobs: | ||
SwiftLint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Swiftlint | ||
uses: norio-nomura/[email protected] | ||
with: | ||
args: --strict | ||
env: | ||
WORKING_DIRECTORY: Validate | ||
DIFF_BASE: ${{ github.base_ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
only_rules: | ||
- closure_spacing | ||
- colon | ||
- empty_count | ||
- fatal_error_message | ||
- force_cast | ||
- force_try | ||
- force_unwrapping | ||
- implicitly_unwrapped_optional | ||
- legacy_cggeometry_functions | ||
- legacy_constant | ||
- legacy_constructor | ||
- legacy_nsgeometry_functions | ||
- operator_usage_whitespace | ||
- redundant_string_enum_value | ||
- return_arrow_whitespace | ||
- trailing_newline | ||
- type_name | ||
- unused_optional_binding | ||
- vertical_whitespace | ||
- void_return | ||
- custom_rules | ||
|
||
custom_rules: | ||
no_direct_standard_out_logs: | ||
name: "Writing log messages directly to standard out is disallowed" | ||
regex: "(\\bprint|\\bdebugPrint|\\bdump|Swift\\.print|Swift\\.debugPrint|Swift\\.dump)\\s*\\(" | ||
match_kinds: | ||
- identifier | ||
message: "Don't commit `print(…)`, `debugPrint(…)`, or `dump(…)` as they write to standard out in release. Either log to a dedicated logging system or silence this warning in debug-only scenarios explicitly using `// swiftlint:disable:next no_direct_standard_out_logs`" | ||
severity: error | ||
|
||
vertical_whitespace: | ||
max_empty_lines: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
Validate.xcodeproj/xcshareddata/xcschemes/Validate.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1320" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A4AD9DF32714873F007890AD" | ||
BuildableName = "Validate.framework" | ||
BlueprintName = "Validate" | ||
ReferencedContainer = "container:Validate.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO" | ||
testExecutionOrdering = "random"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A4AD9DFD2714873F007890AD" | ||
BuildableName = "ValidateTests.xctest" | ||
BlueprintName = "ValidateTests" | ||
ReferencedContainer = "container:Validate.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "A4AD9DF32714873F007890AD" | ||
BuildableName = "Validate.framework" | ||
BlueprintName = "Validate" | ||
ReferencedContainer = "container:Validate.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
16 changes: 5 additions & 11 deletions
16
Validate/Source/Extensions/NSRegularExpression+Extension.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import Foundation | ||
|
||
|
||
public extension Sequence where Element: Error | ||
{ | ||
var localizedDescriptions: [String] { | ||
extension Sequence where Element: Error { | ||
public var localizedDescriptions: [String] { | ||
self.map { $0.localizedDescription } | ||
} | ||
} |
Oops, something went wrong.