提交 7bce22d4 编写于 作者: J Justin

Merge pull request #691 from presidentbeef/add_cc_test_coverage

Add CodeClimate test coverage
......@@ -8,3 +8,9 @@ rvm:
- "1.9.3"
- "2.1.6"
- "2.2.2"
addons:
code_climate:
repo_token: 521d341f3320acda1902d0db0a3a92fb16b11ebfe3d5ab730218d4fc0fb3db13
sudo: false
......@@ -4,9 +4,4 @@ gemspec :name => "brakeman"
gem "rake", "< 10.2.0"
# Slim v3.0.0 dropped support for Ruby <1.9.2.
if RUBY_VERSION < "1.9.2"
gem "slim", ">=1.3.6", "< 3.0"
else
gem "slim", ">=1.3.6"
end
gem "codeclimate-test-reporter", group: :test, require: nil
[![Brakeman Logo](http://brakemanscanner.org/images/logo_medium.png)](http://brakemanscanner.org/)
[![Travis CI
Status](https://secure.travis-ci.org/presidentbeef/brakeman.png)](https://travis-ci.org/presidentbeef/brakeman)
[![Code
Climate](https://codeclimate.com/github/presidentbeef/brakeman.png)](https://codeclimate.com/github/presidentbeef/brakeman)
[![Build Status](https://travis-ci.org/presidentbeef/brakeman.svg?branch=master)](https://travis-ci.org/presidentbeef/brakeman)
[![Code Climate](https://codeclimate.com/github/presidentbeef/brakeman/badges/gpa.svg)](https://codeclimate.com/github/presidentbeef/brakeman)
[![Test Coverage](https://codeclimate.com/github/presidentbeef/brakeman/badges/coverage.svg)](https://codeclimate.com/github/presidentbeef/brakeman/coverage)
# Brakeman
......
......@@ -5,16 +5,18 @@ $LOAD_PATH.unshift "#{TEST_PATH}/../lib"
begin
require 'simplecov'
SimpleCov.start do
add_filter 'lib/ruby_parser/ruby18_parser.rb'
add_filter 'lib/ruby_parser/ruby19_parser.rb'
add_filter 'lib/ruby_parser/ruby_lexer.rb'
add_filter 'lib/ruby_parser/ruby_parser_extras.rb'
end
SimpleCov.start
rescue LoadError => e
$stderr.puts "Install simplecov for test coverage report"
end
begin
require "codeclimate-test-reporter"
CodeClimate::TestReporter.start
rescue LoadError => e
$stderr.puts "Skipping Code Climate test reporting"
end
require 'brakeman'
require 'brakeman/scanner'
require 'test/unit'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册