-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
Use SwiftLint via CocoaPods
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
disabled_rules: | ||
- type_name | ||
|
||
opt_in_rules: | ||
- force_unwrapping | ||
|
||
# Rules customization | ||
line_length: | ||
warning: 120 | ||
error: 200 | ||
|
||
nesting: | ||
type_level: | ||
warning: 2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ use_frameworks! | |
|
||
target 'Tests' do | ||
pod 'StencilSwiftKit', path: '.' | ||
pod 'SwiftLint', '~> 0.25' | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
PROJECT_DIR="${PROJECT_DIR:-`cd "$(dirname $0)/..";pwd`}" | ||
SWIFTLINT="${PROJECT_DIR}/Pods/SwiftLint/swiftlint" | ||
CONFIG="${PROJECT_DIR}/.swiftlint.yml" | ||
|
||
# possible paths | ||
paths_sources="Sources" | ||
paths_tests="Tests" | ||
|
||
# load selected group | ||
if [ $# -gt 0 ]; then | ||
key="$1" | ||
else | ||
echo "error: need group to lint." | ||
exit 1 | ||
fi | ||
|
||
selected_path=`eval echo '$'paths_$key` | ||
if [ -z "$selected_path" ]; then | ||
echo "error: need a valid group to lint." | ||
exit 1 | ||
fi | ||
|
||
"$SWIFTLINT" lint --strict --config "$CONFIG" --path "${PROJECT_DIR}/${selected_path}" |