-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SwiftLint via CocoaPods #78
Changes from 8 commits
b7c3eeb
ebed898
a570445
afbc20b
375a52e
8e69206
2a6edfa
86ef8e2
831d1a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
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,24 @@ | ||
#!/bin/bash | ||
|
||
SWIFTLINT="$(PWD)/Pods/SwiftLint/swiftlint" | ||
CONFIG="$(PWD)/.swiftlint.yml" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as SwiftGen/SwiftGen#401 (comment) |
||
|
||
# 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 "${PWD}/${selected_path}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍, + 💯