Skip to content

Commit

Permalink
new swiftlint rules
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dennisweissmann committed Jan 15, 2017
1 parent 6f55a6e commit 762124d
Show file tree
Hide file tree
Showing 7 changed files with 410 additions and 389 deletions.
12 changes: 8 additions & 4 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
opt_in_rules:
- empty_count
- missing_docs
#- missing_docs
- force_unwrapping
- overridden_super_call
- redundant_nil_coalescing
- redundant_optional_initialization
- redundant_void_return
- sorted_imports
- object_literal

disabled_rules:
- file_length
- line_length

line_length:
- 160
- 160
1 change: 0 additions & 1 deletion DeviceKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//
// Created by Dennis Weissmann on 8/12/16.
//
//

@import Foundation;

Expand Down
2 changes: 1 addition & 1 deletion DeviceKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'DeviceKit'
s.version = '1.0.0'
s.version = '1.0.1'
s.summary = 'DeviceKit is a µ-framework that provides a value-type replacement of UIDevice.'

s.description = <<-DESC
Expand Down
18 changes: 18 additions & 0 deletions DeviceKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 955EE5AB1D5E581B008C3DA8 /* Build configuration list for PBXNativeTarget "DeviceKit" */;
buildPhases = (
958E8B081E2B7A70008C3B1B /* Code Formatting and Linting */,
955EE5951D5E581B008C3DA8 /* Sources */,
955EE5961D5E581B008C3DA8 /* Frameworks */,
955EE5971D5E581B008C3DA8 /* Headers */,
Expand Down Expand Up @@ -205,6 +206,23 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
958E8B081E2B7A70008C3B1B /* Code Formatting and Linting */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Code Formatting and Linting";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
955EE5951D5E581B008C3DA8 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down
Loading

0 comments on commit 762124d

Please sign in to comment.