Skip to content

Commit

Permalink
add Swift stdlib to OSSCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim committed Jan 11, 2017
1 parent 4f225a4 commit 4689e88
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ end
if has_app_changes
@repos = [
'Alamofire/Alamofire',
'apple/swift',
'JohnCoates/Aerial',
'jpsim/SourceKitten',
'Moya/Moya',
Expand All @@ -48,17 +49,19 @@ if has_app_changes
if clone
puts "Cloning #{repo_name}"
`git clone "https://github.com/#{repo}" --depth 1 2> /dev/null`
if repo_name == 'swift'
File.open("swift/.swiftlint.yml", 'w') do |file|
file << 'included: stdlib'
end
end
end
Dir.chdir(repo_name) do
iterations = 5
print "Linting #{iterations} iterations of #{repo_name} with #{branch}: 1"
@commits[repo] = `git rev-parse HEAD`
durations = []
start = Time.now
command = '../../.build/release/swiftlint'
if `#{command} help lint`.include? '--no-cache'
command += ' lint --no-cache'
end
command = '../../.build/release/swiftlint lint --no-cache'
File.open("../#{branch}_reports/#{repo_name}.txt", 'w') do |file|
Open3.popen3(command) do |_, stdout, _, _|
file << stdout.read.chomp
Expand Down

0 comments on commit 4689e88

Please sign in to comment.