Created
August 10, 2017 13:32
-
-
Save maxfriedrich/817c49c05c1f4d79ca53785f47a10a40 to your computer and use it in GitHub Desktop.
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
#! /usr/bin/env ruby | |
dir = File.dirname(File.realpath(__FILE__)) | |
linter = File.join(dir, 'bin', 'swiftlint') | |
config = File.join(dir, 'config', 'swiftlint.yml') | |
output = `#{linter} lint --config #{config} 2>&1` | |
status = $?.exitstatus | |
STDERR.puts output | |
if (status == 1 && output.include?('No lintable files found')) | |
exit 0 | |
else | |
exit status | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment