您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
Simon Brandhof 3f42ac85a4 RuleRepositoryTestHelper is back 10 年前
plugins SONAR-926 fix support of CPD without exclusion patterns 10 年前
sonar-application No more embed checkstyle & pmd plugins by default. 10 年前
sonar-batch SONAR-926 Do not fail if basedir is not dir in a sonar-runner task 10 年前
sonar-batch-maven-compat Upgrade to 4.2-SNAPSHOT 10 年前
sonar-channel Revert CodeReaderConfiguration deprecated methods 10 年前
sonar-check-api SONAR-4908 support tags in sonar-check-api and in standard XML format 10 年前
sonar-colorizer Fix quality flaws 10 年前
sonar-core Fix quality flaws 10 年前
sonar-deprecated RuleRepositoryTestHelper is back 10 年前
sonar-duplications Upgrade to 4.2-SNAPSHOT 10 年前
sonar-graph Fix quality flaws 10 年前
sonar-home Upgrade to 4.2-SNAPSHOT 10 年前
sonar-java-api SONAR-926 move org.sonar.api.resources.Method to sonar-deprecated 10 年前
sonar-markdown Move sonar-markdown to fest-assert 10 年前
sonar-maven-plugin Fixed warnings in sonar-maven-plugin 10 年前
sonar-maven3-plugin Upgrade to 4.2-SNAPSHOT 10 年前
sonar-plugin-api SONAR-926 Mark FileQuery as deprecated 10 年前
sonar-server Add an entry tooltip inside select filters 10 年前
sonar-squid Upgrade to 4.2-SNAPSHOT 10 年前
sonar-testing-harness RuleRepositoryTestHelper is back 10 年前
sonar-ws-client SONAR-926 Export component path in issues WS search results 10 年前
.gitattributes Tests should be independent from EOL in resources 13 年前
.gitignore JS - improve integration of karma and upgrade to v0.10.8 10 年前
.mailmap .mailmap file to resolve wrong author names 12 年前
COPYING Fix crlf 13 年前
KEYS Add Eric Hartmann's key 12 年前
README.md Complete build section of readme 10 年前
copyright.txt Update copyright headers 11 年前
pom.xml No more embed checkstyle & pmd plugins by default. 10 年前
push.sh Add unbreakable build script for mac 12 年前
quick-build.bat Skip sanity checks in dev profile 12 年前
quick-build.sh Skip sanity checks in dev profile 12 年前
start-mac-h2.sh SONAR-4579 The archive sonar-x.y.zip must be renamed sonarqube-x.y.zip 10 年前

README.md

SonarQube

Put your technical debt under control. For more information please see:

Sources

This Git repository is core platform. Plugins are hosted in SonarCommunity and SonarSource organisations.

Checkout Sources

If you have never used Git before, you need to do some setup first. Run the following commands so that GIT knows your name and email.

git config --global user.name "Your Name"
git config --global user.email "your@email.com"

Setup line endings preferences:

# For Unix/Mac users
git config --global core.autocrlf input
git config --global core.safecrlf true

# For Windows users
git config --global core.autocrlf true
git config --global core.safecrlf true

Get sources by executing:

git clone https://github.com/SonarSource/sonar.git

Committers must configure their SSH key (see GitHub documentation for Windows and Mac) and clone repository:

git clone git@github.com:SonarSource/sonar.git

Build

  • Install JDK 6 or greater
  • Install Maven 3.0.5 or greater
  • Execute mvn clean install. To quickly build in development environment, the script quick-build.sh does not execute unit tests and compile GWT components for Firefox/Chrome only.
  • ZIP file of application is generated in sonar-application/target/

Edit Ruby Code

The development mode is used to edit Ruby on Rails code. The application is automatically reloaded when Ruby files are saved. It avoids restarting the server. Changes are reloaded on the fly. Execute one of the following commands from the sonar-server/ directory to start server:

# for embedded database
sonar-server/derby-start.sh

# or for other dbs
sonar-server/mysql-start.sh
sonar-server/postgresql-start.sh

Then Ruby code can be directly edited from sonar-server/src/main/webapp/WEB-INF/app.

Debug Maven Analysis

Debug Maven analysis by executing mvnDebug sonar:sonar. Then attach your IDE to the remote process (the listening port is 8000).

Example in Intellij Idea : Run -> Edit configurations -> Add new configuration -> Remote -> port 8000.

Profile Maven Analysis with JProfiler

Duplicate $MAVEN_HOME/bin/mvnDebug to mvnJProfiler and replace the property MAVEN_DEBUG_OPTS by:

MAVEN_DEBUG_OPTS="-Xint -agentlib:jprofilerti=port=8849 -Xbootclasspath/a:/path/to/jprofiler/bin/agent.jar"

Then start JProfiler -> Connect to an application on a remote computer

Log All Server SQL Requests

Download log4jdbc4-1.2.jar from http://log4jdbc.googlecode.com/files/log4jdbc4-1.2.jar in $SONAR_HOME/war/sonar-server/WEB-INF/lib/log4jdbc4-1.2.jar, and edit conf/logback.xml:

<logger name="jdbc.sqltiming">
  <level value="OFF"/>
  <appender-ref ref="PROFILING_FILE"/>
</logger>
<logger name="jdbc.connection">
    <level value="INFO"/>
    <appender-ref ref="PROFILING_FILE"/>
</logger>
<logger name="jdbc.audit">
    <level value="OFF"/>
    <appender-ref ref="PROFILING_FILE"/>
</logger>
<logger name="jdbc.resultset">
    <level value="OFF"/>
    <appender-ref ref="PROFILING_FILE"/>
</logger>
<logger name="jdbc.sqlonly">
    <level value="OFF"/>
    <appender-ref ref="PROFILING_FILE"/>
</logger>

License

Copyright 2008-2013 SonarSource.

Licensed under the GNU Lesser General Public License, Version 3.0: http://www.gnu.org/licenses/lgpl.txt