Skip to content

Commit cb86d51

Browse files
author
Vladimir Kotal
committed
enable SonarQube checker
fixes #2090
1 parent 0a78196 commit cb86d51

File tree

4 files changed

+13
-30
lines changed

4 files changed

+13
-30
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
language: java
22
cache:
33
directories:
4-
- $HOME/.m2
4+
- '$HOME/.m2'
5+
- '$HOME/.sonar/cache'
56
matrix:
67
include:
78
- os: linux
@@ -27,6 +28,10 @@ addons:
2728
branch_pattern: "coverity_scan"
2829
# build_command_prepend: "mvn clean"
2930
build_command: "mvn -DskipTests=true -Dmaven.javadoc.skip=false -B -V compile"
31+
sonarcloud:
32+
organization: "opengrok"
33+
token:
34+
secure: "s7wSQ/RcmxBJDDWS3ht6tDAvQQVi3vOPK0lJJj8cDeWFe2KbN67yORDZNteM36LI0vQ9lWNe8FDyOShmxSiiP3Bln1HgWYNS35hBEUrTvIOBS217n4XIAPFGXFcKHq094iPqXsoJf1WiVDdB3++9iiXQ1q5D/P1jeUnfbQNzRdTprNDk0nGuRmhk6AxGraZB0i877E0UlLdS7ZVN9pJBL6qGu49wuhITqNNVZIMfZ6m3fNQBWE1ajoxq9OUG4MlaIf3avV/0r0b4U5hl09AFbhP9ZhjLrleGa2A4bb7KC03FsZMpwQVVAjmPAlWi+tvDjuH0WlxLcypHwZc6DO/M/MfpQGlnZhwheueFT3GMjr1Hy4DoGp7NjIUvcMUYm6UrY8Xv2r8KUyZ+itRodNFbQdAf0Of1kTuG6gFVZAeEO7aw91Nxc8HAl5u+eE9SvyAU8Gti7I9B0J3z0JafJ4KhG8RrwevrZV6M0GqflrPK6IHsgD0QCqRtT226r4FtsMG70xRRda6OOLsPdp79E6Kk68EfJNVaGaamIhUMnPmRaIMWR6bDktXHkWWduWIVfmGIbXdTYxSSz+xMFWcaaZMDyW/FAzEDoig2MIFLjY6hTPVeCfQxetPYCmjNw9ywxClU9Ce0qmNTxstaR9hczKWcx2Wf6KcgXqxC6r813u5dS+g="
3035
deploy:
3136
# Pre-release
3237
- provider: releases

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
33

44

55
# OpenGrok - a wicked fast source browser
6-
[![Travis Status](https://travis-ci.org/oracle/opengrok.svg?branch=master)](https://travis-ci.org/oracle/opengrok)
6+
[![Travis status](https://travis-ci.org/oracle/opengrok.svg?branch=master)](https://travis-ci.org/oracle/opengrok)
77
[![wercker status](https://app.wercker.com/status/e2a879f4677e679c0bbf8fa82bcc0dba/s/master "wercker status")](https://app.wercker.com/project/byKey/e2a879f4677e679c0bbf8fa82bcc0dba)
8-
[![Coverage Status](https://coveralls.io/repos/oracle/opengrok/badge.svg?branch=master)](https://coveralls.io/r/oracle/opengrok?branch=master)
8+
[![Coverage status](https://coveralls.io/repos/oracle/opengrok/badge.svg?branch=master)](https://coveralls.io/r/oracle/opengrok?branch=master)
9+
[![SonarQube status](https://sonarcloud.io/api/project_badges/measure?project=org.opengrok%3Aopengrok-top&metric=alert_status)](https://sonarcloud.io/api/project_badges/measure?project=org.opengrok%3Aopengrok-top&metric=alert_status)
910

1011
1. [Introduction](#1-introduction)
1112
2. [OpenGrok setup](#2-opengrok-install-and-setup)

dev/main

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/bin/bash
22

33
#
4-
# Do not run coverage for forks as most people do not have Coveralls enabled
4+
# Do not run coverage for forks as most people do not have extra tools enabled
55
# for their fork.
66
#
77
extra_args=""
88
if [ "x$TRAVIS_REPO_SLUG" == "xoracle/opengrok" ]; then
99
echo "Enabling Jacoco/Coveralls"
1010
extra_args="jacoco:report org.eluder.coveralls:coveralls-maven-plugin:report"
11+
extra_args="$extra_args sonar:sonar"
1112
fi
1213

1314
mvn -B -V verify $extra_args

sonar-project.properties

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,7 @@
1-
# Required metadata
2-
sonar.projectKey=OpenGrok
1+
sonar.projectKey=opengrok
32
sonar.projectName=OpenGrok analyzed with the SonarQube Runner
43
sonar.projectVersion=1.1
54

6-
# Comma-separated paths to directories with sources (required)
7-
sonar.sources=src,test
8-
#,generatedsrc
9-
sonar.java.binaries=build,dist
10-
11-
sonar.java.libraries=dist/*.jar,dist/lib/*.jar
12-
13-
sonar.scm.provider=git
14-
15-
# Language
16-
sonar.language=java
17-
18-
# PMD
5+
sonar.sources=.
196
sonar.java.source=1.8
20-
21-
# findbugs
22-
sonar.findbugs.excludesFilters=tools/findbugs_filter.xml
23-
24-
# code coverage
25-
sonar.junit.reportsPath=build/test/results/
26-
sonar.jacoco.reportPath=jacoco.exec
27-
sonar.java.coveragePlugin=jacoco
28-
sonar.jacoco.reportMissing.force.zero=true
29-
30-
# Encoding of the source files
317
sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)