Skip to content

Commit

Permalink
Merge c2b670c into 4f0923e
Browse files Browse the repository at this point in the history
  • Loading branch information
jgebal committed Mar 6, 2017
2 parents 4f0923e + c2b670c commit 9f1492d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ addons:
- oracle-java8-set-default
sonarqube:
token:
secure: AmQdR1Fm0tvA9Ees1wz1RqnUl49lZrGdhWCkx7SnIzz+/1Lm2L9aH/e4bL60wIqkJ+AK8tJ1YX4L2B+i7/t5dBSH9Nj8JgbJFwHMqHdMCmaqKpvT5eJRzhbgr0kccm8ECHWTWBL+mIyXXYUm4f/tuRnnngfZS/bxtUpFUDvotcEybuuGUvKSbmc6ew5tfBuX79G/lXbFBceO6EQStoi8SeIHDkgeX/BoQQin0BFVMcsuWKPuQ5P5B19KfxubEk6tiHLZffoaF1q+RbsFcwpr4nyXHiusTRdtLmHb5DvlSQsy15qaakJP6AA073sGjnKxcGiGvP48HbC07tQmtBiZY2Ybkqj9i4aRq0hzX/VXRuZOV/rQARjItS4MKTmD9gET9XkYzc/P8VxSGRFT97guF3f6qtPzcGCu3TbFQpgeP+mgcePLvDl5j/AL+tZAAwSj3mPhEGncr5j+QkcLhl+mM5TymNeJn828qb8I7+mSdqbmPwytc//hwJLeqFJDX2GGnXZD4VkMZDvUO6gq2bQXy0hLgdI7uIQpIzIUlAGoYG6MK4SuHxnx+ZNwsW/nrMGVCJrK67Ii/R++Fg4et5QshTaTbkcQ3Deroady/pnGwlD5FR59LYpjqOVQ+4ey2bf92eGx0j0NWCz+CfirKSXd3o1hESSqamyi8KtOqkqiLEg=

secure: ${SONAR_TOKEN}
branches:
- develop
- testing_sonar
env:
global:
- ORACLE_COOKIE=sqldev
Expand Down Expand Up @@ -69,7 +71,7 @@ script:
# - bash .travis/build_docs.sh
# - bash .travis/push_docs_to_gh_pages.sh
- sonar-scanner
- bash .travis/coveralls_uploader.sh
- bash .travis/coveralls_uploader.sh

deploy:
provider: releases
Expand Down
2 changes: 2 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ sonar.links.issue=https://github.com/utPLSQL/utPLSQL/issues
sonar.links.ci=https://travis-ci.org/utPLSQL/utPLSQL
sonar.links.homepage=https://github.com/utPLSQL/utPLSQL
sonar.projectDescription=PL/SQL Unit Testing Framework
sonar.plsql.file.suffixes=sql,tab,pkb,tpb
sonar.language=plsql

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
6 changes: 4 additions & 2 deletions source/reporters/ut_coverage_sonar_reporter.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ create or replace type body ut_coverage_sonar_reporter is
function get_lines_xml(a_unit_coverage ut_coverage.t_unit_coverage) return clob is
l_file_part varchar2(32767);
l_result clob;
c_no_lines constant varchar2(30) := '<lineToCover/>'||chr(10);
l_line_no binary_integer;
begin
dbms_lob.createtemporary(l_result, true);
l_line_no := a_unit_coverage.lines.first;
if l_line_no is null then
dbms_lob.writeappend(l_result, length(c_no_lines), c_no_lines);
for i in 1 .. a_unit_coverage.total_lines loop
l_file_part := '<lineToCover lineNumber="'||i||'" covered="false"/>'||chr(10);
dbms_lob.writeappend(l_result, length(l_file_part), l_file_part);
end loop;
else
while l_line_no is not null loop
l_file_part :=
Expand Down
8 changes: 7 additions & 1 deletion source/reporters/ut_coveralls_reporter.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ create or replace type body ut_coveralls_reporter is
dbms_lob.writeappend(l_result, length(c_coverage_header), c_coverage_header);

l_last_line_no := a_unit_coverage.lines.last;
if l_last_line_no is not null then
if l_last_line_no is null then
l_last_line_no := a_unit_coverage.total_lines - 1;
for i in 1 .. l_last_line_no loop
dbms_lob.writeappend(l_result, 2, '0,');
end loop;
dbms_lob.writeappend(l_result, 1, '0');
else
for line_no in 1 .. l_last_line_no loop
l_file_part :=
case
Expand Down

0 comments on commit 9f1492d

Please sign in to comment.