Skip to content

Commit 762124d

Browse files
new swiftlint rules
use swiftformat to format source code new (well, Swift 3) operator syntax (static funcs instead of global ones) bump version to 1.0.1 new implementation of `isZoomed` (which hopefully works now), this closes #59
1 parent 6f55a6e commit 762124d

File tree

7 files changed

+410
-389
lines changed

7 files changed

+410
-389
lines changed

.swiftlint.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
opt_in_rules:
22
- empty_count
3-
- missing_docs
3+
#- missing_docs
44
- force_unwrapping
5+
- overridden_super_call
6+
- redundant_nil_coalescing
7+
- redundant_optional_initialization
8+
- redundant_void_return
9+
- sorted_imports
10+
- object_literal
511

612
disabled_rules:
713
- file_length
14+
- line_length
815

9-
line_length:
10-
- 160
11-
- 160

DeviceKit.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//
55
// Created by Dennis Weissmann on 8/12/16.
66
//
7-
//
87

98
@import Foundation;
109

DeviceKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'DeviceKit'
3-
s.version = '1.0.0'
3+
s.version = '1.0.1'
44
s.summary = 'DeviceKit is a µ-framework that provides a value-type replacement of UIDevice.'
55

66
s.description = <<-DESC

DeviceKit.xcodeproj/project.pbxproj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
isa = PBXNativeTarget;
120120
buildConfigurationList = 955EE5AB1D5E581B008C3DA8 /* Build configuration list for PBXNativeTarget "DeviceKit" */;
121121
buildPhases = (
122+
958E8B081E2B7A70008C3B1B /* Code Formatting and Linting */,
122123
955EE5951D5E581B008C3DA8 /* Sources */,
123124
955EE5961D5E581B008C3DA8 /* Frameworks */,
124125
955EE5971D5E581B008C3DA8 /* Headers */,
@@ -205,6 +206,23 @@
205206
};
206207
/* End PBXResourcesBuildPhase section */
207208

209+
/* Begin PBXShellScriptBuildPhase section */
210+
958E8B081E2B7A70008C3B1B /* Code Formatting and Linting */ = {
211+
isa = PBXShellScriptBuildPhase;
212+
buildActionMask = 2147483647;
213+
files = (
214+
);
215+
inputPaths = (
216+
);
217+
name = "Code Formatting and Linting";
218+
outputPaths = (
219+
);
220+
runOnlyForDeploymentPostprocessing = 0;
221+
shellPath = /bin/sh;
222+
shellScript = "command -v swiftformat >/dev/null 2>&1 || {\n echo >&2 \"swiftformat not found. Trying to install it via Homebrew...\"\n command -v brew >/dev/null 2>&1 || {\n echo >&2 \"Installing swiftformat via homebrew failed. Homebrew not found. Aborting.\"; exit 1;\n }\n echo >&2 \"Homebrew found, trying to install swiftformat.\";\n brew update && brew install swiftformat\n}\nswiftformat ${SRCROOT}/ --indent 2 --removelines disabled --disable trailingCommas\n\ncommand -v swiftlint >/dev/null 2>&1 || {\n echo >&2 \"swiftlint not found. Trying to install it via Homebrew...\"\n command -v brew >/dev/null 2>&1 || {\n echo >&2 \"Installing swiftlint via homebrew failed. Homebrew not found. Aborting.\"; exit 1;\n }\n echo >&2 \"Homebrew found, trying to install swiftlint.\";\n brew update && brew install swiftlint\n}\nswiftlint autocorrect\n\nswiftlint";
223+
};
224+
/* End PBXShellScriptBuildPhase section */
225+
208226
/* Begin PBXSourcesBuildPhase section */
209227
955EE5951D5E581B008C3DA8 /* Sources */ = {
210228
isa = PBXSourcesBuildPhase;

0 commit comments

Comments
 (0)