Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e8d26f8

Browse files
committed
Adding sonar ojdbc
1 parent 52146fc commit e8d26f8

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.travis/run_sonar_scanner.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ PR_KEY_PROPERTY="sonar.pullrequest.key"
1212
PR_SONAR_BASE_PROPERTY="sonar.pullrequest.base"
1313
PR_SONAR_TOKEN_PROPERTY="sonar.pullrequest.github.token.secured"
1414

15+
DB_URL_SONAR_PROPERTY="sonar.plsql.jdbc.url"
16+
DB_DRIVER_PATH="sonar.plsql.jdbc.driver.path"
17+
1518
#Add property to file
1619
function add_sonar_property {
1720
echo "$1=$2" >> sonar-project.properties
@@ -55,5 +58,9 @@ fi
5558
#Address issue : Could not find ref 'develop' in refs/heads or refs/remotes/origin
5659
git fetch --no-tags https://github.com/utPLSQL/utPLSQL.git +refs/heads/develop:refs/remotes/origin/develop
5760

61+
add_sonar_property "${DB_URL_SONAR_PROPERTY}" "jdbc:oracle:thin:@${CONNECTION_STR}"
62+
add_sonar_property "${DB_DRIVER_PATH}" "${OJDBC_HOME}/ojdbc8.jar"
63+
64+
5865
#Execute Sonar scanner
5966
sonar-scanner

sonar-project.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,12 @@ sonar.pullrequest.provider=github
2626
sonar.pullrequest.github.endpoint=https://api.github.com/
2727
sonar.pullrequest.github.repository=utPLSQL/utPLSQL
2828

29+
sonar.plsql.jdbc.driver.class=oracle.jdbc.OracleDriver
30+
sonar.plsql.jdbc.user=UT3
31+
sonar.plsql.jdbc.password=ut3
32+
sonar.plsql.defaultSchema=UT3
33+
34+
35+
2936
# Encoding of the source code. Default is default system encoding
3037
#sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)