@@ -46,9 +46,7 @@ import static org.mockito.Mockito.when; | |||
import static org.sonar.ce.task.projectanalysis.component.ComponentVisitor.Order.PRE_ORDER; | |||
import static org.sonar.db.component.ComponentTesting.newPrivateProjectDto; | |||
import static org.sonar.db.organization.OrganizationTesting.newOrganizationDto; | |||
import static org.sonar.scanner.protocol.output.ScannerReport.Component.ComponentType.DIRECTORY; | |||
import static org.sonar.scanner.protocol.output.ScannerReport.Component.ComponentType.FILE; | |||
import static org.sonar.scanner.protocol.output.ScannerReport.Component.ComponentType.MODULE; | |||
import static org.sonar.scanner.protocol.output.ScannerReport.Component.ComponentType.PROJECT; | |||
import static org.sonar.scanner.protocol.output.ScannerReport.Component.ComponentType.UNRECOGNIZED; | |||
import static org.sonar.scanner.protocol.output.ScannerReport.Component.newBuilder; |
@@ -4,15 +4,6 @@ sonarqube { | |||
} | |||
} | |||
sourceSets { | |||
test { | |||
resources { | |||
srcDirs += ['src/test/projects'] | |||
} | |||
} | |||
} | |||
import org.apache.tools.ant.filters.ReplaceTokens | |||
processResources { | |||
filesMatching('build.properties') { | |||
@@ -53,7 +44,6 @@ dependencies { | |||
compile project(':server:sonar-webserver-auth') | |||
compile project(':server:sonar-webserver-common') | |||
compile project(':server:sonar-webserver-es') | |||
compile project(':server:sonar-webserver-ws') | |||
compile project(':sonar-core') | |||
compile project(':sonar-duplications') | |||
compile project(':sonar-scanner-protocol') |
@@ -17,7 +17,7 @@ | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.platform.ws; | |||
package org.sonar.server.platform; | |||
import java.util.Collection; | |||
import org.sonar.api.utils.text.JsonWriter; |
@@ -25,6 +25,7 @@ import org.sonar.api.config.Settings; | |||
import org.sonar.db.DbClient; | |||
import org.sonar.db.DbSession; | |||
import org.sonar.db.property.PropertyDto; | |||
import org.sonar.server.setting.SettingsChangeNotifier; | |||
public class PersistentSettings { | |||
@@ -25,6 +25,7 @@ import org.sonar.api.config.Settings; | |||
import org.sonar.api.config.internal.MapSettings; | |||
import org.sonar.api.utils.System2; | |||
import org.sonar.db.DbTester; | |||
import org.sonar.server.setting.SettingsChangeNotifier; | |||
import static org.assertj.core.api.Assertions.assertThat; | |||
import static org.mockito.Mockito.mock; |
@@ -1,36 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||
<modelVersion>4.0.0</modelVersion> | |||
<groupId>org.sonarsource.sonarqube.tests</groupId> | |||
<artifactId>test-core-plugin</artifactId> | |||
<version>0.1-SNAPSHOT</version> | |||
<packaging>sonar-plugin</packaging> | |||
<name>Test Core Plugin</name> | |||
<description>Fake core plugin used by tests</description> | |||
<dependencies> | |||
<dependency> | |||
<groupId>org.codehaus.sonar</groupId> | |||
<artifactId>sonar-plugin-api</artifactId> | |||
<version>4.5.4</version> | |||
<scope>provided</scope> | |||
</dependency> | |||
</dependencies> | |||
<build> | |||
<sourceDirectory>src</sourceDirectory> | |||
<plugins> | |||
<plugin> | |||
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId> | |||
<artifactId>sonar-packaging-maven-plugin</artifactId> | |||
<version>1.15</version> | |||
<extensions>true</extensions> | |||
<configuration> | |||
<pluginKey>core</pluginKey> | |||
<pluginClass>CorePlugin</pluginClass> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
</build> | |||
</project> |
@@ -1,6 +0,0 @@ | |||
{ | |||
"id": 25, | |||
"severity": "MINOR", | |||
"profileId": 1, | |||
"inheritance": null | |||
} |
@@ -1,7 +0,0 @@ | |||
{ | |||
"id": 391, | |||
"severity": "MINOR", | |||
"profileId": 2, | |||
"inheritance": "INHERITED", | |||
"activeRuleParentId": 25 | |||
} |
@@ -1,13 +0,0 @@ | |||
{ | |||
"id": 2303, | |||
"key": "RuleA", | |||
"language": "xoo", | |||
"name": "A first rule", | |||
"description": "First rule of Fight Club is: you do not talk about Fight Club.", | |||
"parentKey": null, | |||
"repositoryKey": "xoo", | |||
"severity": "INFO", | |||
"status": "READY", | |||
"createdAt": "2013-12-04T10:24:09.000Z", | |||
"updatedAt": "2013-12-12T15:19:59.000Z" | |||
} |
@@ -1,13 +0,0 @@ | |||
{ | |||
"id": 2305, | |||
"key": "RuleC", | |||
"language": "xoo", | |||
"name": "C third rule", | |||
"description": "Third rule of Fight Club: someone yells stop, goes limp, taps out, the fight is over.", | |||
"parentKey": null, | |||
"repositoryKey": "xoo", | |||
"severity": "BLOCKER", | |||
"status": "READY", | |||
"createdAt": "2013-07-04T07:38:05.543Z", | |||
"updatedAt": "2013-03-27T08:52:40.370Z" | |||
} |
@@ -1,13 +0,0 @@ | |||
{ | |||
"id": 2304, | |||
"key": "Ruleb", | |||
"language": "xoo", | |||
"name": "b second rule", | |||
"description": "Second rule of Fight Club is: you do NOT talk about Fight Club.", | |||
"parentKey": null, | |||
"repositoryKey": "xoo", | |||
"severity": "MAJOR", | |||
"status": "READY", | |||
"createdAt": "2013-12-04T10:24:11.000Z", | |||
"updatedAt": "2013-12-12T15:20:01.000Z" | |||
} |
@@ -1,6 +0,0 @@ | |||
{ | |||
"id": 2307, | |||
"severity": "CRITICAL", | |||
"profileId": 2, | |||
"inheritance": null | |||
} |
@@ -1,6 +0,0 @@ | |||
{ | |||
"id": 2303, | |||
"severity": "INFO", | |||
"profileId": 2, | |||
"inheritance": null | |||
} |
@@ -1,14 +0,0 @@ | |||
{ | |||
"id": 2304, | |||
"key": "RuleWithTagA", | |||
"language": "xoo", | |||
"name": "Rule with tag taga", | |||
"description": "This rule has tag 'taga'", | |||
"parentKey": null, | |||
"repositoryKey": "xoo", | |||
"severity": "INFO", | |||
"status": "READY", | |||
"systemTags": ["taga"], | |||
"createdAt": "2013-12-04T10:24:09.000Z", | |||
"updatedAt": "2013-12-12T15:19:59.000Z" | |||
} |
@@ -1,15 +0,0 @@ | |||
{ | |||
"id": 2305, | |||
"key": "RuleWithTagsAB", | |||
"language": "xoo", | |||
"name": "Rule with tags taga and tagb", | |||
"description": "This rule has tags 'taga' and 'tagb'", | |||
"parentKey": null, | |||
"repositoryKey": "xoo", | |||
"severity": "INFO", | |||
"status": "READY", | |||
"systemTags": ["tagb"], | |||
"adminTags": ["taga"], | |||
"createdAt": "2013-12-04T10:24:09.000Z", | |||
"updatedAt": "2013-12-12T15:19:59.000Z" | |||
} |
@@ -1,15 +0,0 @@ | |||
{ | |||
"id": 2307, | |||
"key": "RuleWithTagsACE", | |||
"language": "xoo", | |||
"name": "Rule with tags taga, tagc and tage", | |||
"description": "This rule has tags 'taga', 'tagc' and 'tage'", | |||
"parentKey": null, | |||
"repositoryKey": "xoo", | |||
"severity": "INFO", | |||
"status": "READY", | |||
"systemTags": ["taga", "tagc"], | |||
"adminTags": ["tage"], | |||
"createdAt": "2013-12-04T10:24:09.000Z", | |||
"updatedAt": "2013-12-12T15:19:59.000Z" | |||
} |
@@ -1,14 +0,0 @@ | |||
{ | |||
"id": 2306, | |||
"key": "RuleWithTagsBC", | |||
"language": "xoo", | |||
"name": "Rule with tags tagb and tagc", | |||
"description": "This rule has tags 'tagb' and 'tagc'", | |||
"parentKey": null, | |||
"repositoryKey": "xoo", | |||
"severity": "INFO", | |||
"status": "READY", | |||
"systemTags": ["tagb", "tagc"], | |||
"createdAt": "2013-12-04T10:24:09.000Z", | |||
"updatedAt": "2013-12-12T15:19:59.000Z" | |||
} |
@@ -1,13 +0,0 @@ | |||
{ | |||
"id": 2303, | |||
"key": "RuleWithoutTags", | |||
"language": "xoo", | |||
"name": "Rule without tags", | |||
"description": "This rule has no tag", | |||
"parentKey": null, | |||
"repositoryKey": "xoo", | |||
"severity": "INFO", | |||
"status": "READY", | |||
"createdAt": "2013-12-04T10:24:09.000Z", | |||
"updatedAt": "2013-12-12T15:19:59.000Z" | |||
} |
@@ -1,6 +0,0 @@ | |||
{ | |||
"id": 25, | |||
"severity": "MINOR", | |||
"profileId": 1, | |||
"inheritance": "OVERRIDES" | |||
} |
@@ -1,16 +0,0 @@ | |||
{ | |||
"id": 2702, | |||
"severity": "CRITICAL", | |||
"profileId": 1, | |||
"inheritance": null, | |||
"params": [ | |||
{ | |||
"key": "fromClasses", | |||
"value": "**.core.**" | |||
}, | |||
{ | |||
"key": "toClasses", | |||
"value": "**.server.**" | |||
} | |||
] | |||
} |
@@ -1,7 +0,0 @@ | |||
{ | |||
"id": 391, | |||
"severity": "MAJOR", | |||
"profileId": 1, | |||
"inheritance": "INHERITED", | |||
"activeRuleParentId": 25 | |||
} |
@@ -1,6 +0,0 @@ | |||
{ | |||
"id": 523, | |||
"severity": "MAJOR", | |||
"profileId": 2, | |||
"inheritance": null | |||
} |
@@ -1,27 +0,0 @@ | |||
{ | |||
"id": 1482, | |||
"key": "ArchitecturalConstraint", | |||
"language": "java", | |||
"name": "Architectural constraint", | |||
"description": "<p>A source code comply to an architectural model when it fully\n\tadheres to a set of architectural constraints. A constraint allows to\n\tdeny references between classes by pattern.</p>\n<p>You can for instance use this rule to :</p>\n<ul>\n\t<li>forbid access to **.web.** from **.dao.** classes</li>\n\t<li>forbid access to java.util.Vector, java.util.Hashtable and\n\t\tjava.util.Enumeration from any classes</li>\n\t<li>forbid access to java.sql.** from **.ui.** and **.web.**\n\t\tclasses</li>\n</ul>", | |||
"parentKey": null, | |||
"repositoryKey": "squid", | |||
"severity": "MAJOR", | |||
"status": "READY", | |||
"createdAt": "2013-12-11T13:48:00.799Z", | |||
"updatedAt": "2013-12-13T17:26:35.767Z", | |||
"params": [ | |||
{ | |||
"key": "toClasses", | |||
"type": "STRING", | |||
"defaultValue": "", | |||
"description": "Mandatory. Ex : java.util.Vector, java.util.Hashtable, java.util.Enumeration" | |||
}, | |||
{ | |||
"key": "fromClasses", | |||
"type": "STRING", | |||
"defaultValue": "", | |||
"description": "Optional. If this property is not defined, all classes should adhere to this constraint. Ex : **.web.**" | |||
} | |||
] | |||
} |
@@ -1,13 +0,0 @@ | |||
{ | |||
"id": 25, | |||
"key": "DM_CONVERT_CASE", | |||
"language": "java", | |||
"name": "Internationalization - Consider using Locale parameterized version of invoked method", | |||
"description": "<p> A String is being converted to upper or lowercase, using the platform's default encoding. This may\n result in improper conversions when used with international characters. Use the </p>\n <table><tr><td>String.toUpperCase( Locale l )</td></tr><tr><td>String.toLowerCase( Locale l )</td></tr></table>\n <p>versions instead.</p>", | |||
"parentKey": null, | |||
"repositoryKey": "findbugs", | |||
"severity": "INFO", | |||
"status": "READY", | |||
"createdAt": "2013-12-04T10:24:09.000Z", | |||
"updatedAt": "2013-12-12T15:19:59.000Z" | |||
} |
@@ -1,14 +0,0 @@ | |||
{ | |||
"id": 719, | |||
"key": "com.puppycrawl.tools.checkstyle.checks.coding.DoubleCheckedLockingCheck", | |||
"language": "java", | |||
"name": "Double Checked Locking", | |||
"description": null, | |||
"parentKey": null, | |||
"repositoryKey": "checkstyle", | |||
"severity": "MAJOR", | |||
"status": "READY", | |||
"cardinality": "SINGLE", | |||
"createdAt": "2013-07-04T07:38:05.543Z", | |||
"updatedAt": "2013-03-27T08:52:40.370Z" | |||
} |
@@ -1,13 +0,0 @@ | |||
{ | |||
"id": 759, | |||
"key": "UnusedNullCheckInEquals", | |||
"language": "java", | |||
"name": "Unused Null Check In Equals", | |||
"description": "After checking an object reference for null, you should invoke equals() on that object rather than passing it to another object's equals() method.", | |||
"parentKey": null, | |||
"repositoryKey": "pmd", | |||
"severity": "MAJOR", | |||
"status": "READY", | |||
"createdAt": "2013-12-04T10:24:11.000Z", | |||
"updatedAt": "2013-12-12T15:20:01.000Z" | |||
} |
@@ -1,14 +0,0 @@ | |||
{ | |||
"id": 860, | |||
"key": "Snippet", | |||
"language": null, | |||
"name": null, | |||
"description": null, | |||
"parentKey": null, | |||
"repositoryKey": "squid", | |||
"severity": "MAJOR", | |||
"status": "REMOVED", | |||
"cardinality": "MULTIPLE", | |||
"createdAt": "2013-07-04T07:38:05.543Z", | |||
"updatedAt": "2013-03-27T08:52:40.370Z" | |||
} |
@@ -1,14 +0,0 @@ | |||
{ | |||
"id": 944, | |||
"key": "S1125", | |||
"language": "java", | |||
"name": "Boolean expressions should not be compared to true or false", | |||
"description": "<p> Boolean expressions should not be compared against boolean literals, as their value can be directly used. </p> <p>The following code:</p> <pre> if (booleanVariable == true) { /* ... */ } // Non-Compliant if (booleanVariable != true) { /* ... */ } // Non-Compliant </pre> <p>should be refactored into:</p> <pre> if (booleanVariable) { /* ... */ } // Compliant if (!booleanVariable) { /* ... */ } // Compliant </pre>", | |||
"parentKey": null, | |||
"repositoryKey": "squid", | |||
"severity": "MAJOR", | |||
"status": "READY", | |||
"cardinality": "SINGLE", | |||
"createdAt": "2013-07-26T07:40:51.977Z", | |||
"updatedAt": "2014-01-10T15:38:27.386Z" | |||
} |
@@ -4,6 +4,14 @@ sonarqube { | |||
} | |||
} | |||
sourceSets { | |||
test { | |||
resources { | |||
srcDirs += ['src/test/projects'] | |||
} | |||
} | |||
} | |||
configurations { | |||
tests | |||
@@ -19,6 +27,7 @@ dependencies { | |||
compile project(':sonar-core') | |||
compile project(':server:sonar-db-dao') | |||
compile project(':server:sonar-process') | |||
compile project(':server:sonar-server-common') | |||
compile project(path: ':sonar-plugin-api', configuration: 'shadow') | |||
compile project(':sonar-plugin-api-impl') | |||
compile 'org.mindrot:jbcrypt' |
@@ -18,7 +18,7 @@ | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
@ParametersAreNonnullByDefault | |||
package org.sonar.server.favorite; | |||
package org.sonar.server.app; | |||
import javax.annotation.ParametersAreNonnullByDefault; | |||
@@ -17,7 +17,7 @@ | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.platform.ws; | |||
package org.sonar.server.platform; | |||
import org.sonar.api.utils.text.JsonWriter; | |||
@@ -18,6 +18,6 @@ | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
@ParametersAreNonnullByDefault | |||
package org.sonar.server.settings; | |||
package org.sonar.server.platform; | |||
import javax.annotation.ParametersAreNonnullByDefault; |
@@ -21,4 +21,3 @@ | |||
package org.sonar.server.plugins; | |||
import javax.annotation.ParametersAreNonnullByDefault; | |||
@@ -17,7 +17,7 @@ | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.settings; | |||
package org.sonar.server.setting; | |||
import java.util.Collections; | |||
import java.util.Map; |
@@ -17,7 +17,7 @@ | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.settings; | |||
package org.sonar.server.setting; | |||
import java.util.List; | |||
import java.util.Map; | |||
@@ -30,7 +30,6 @@ import org.sonar.db.DbClient; | |||
import org.sonar.db.DbSession; | |||
import org.sonar.db.component.ComponentDto; | |||
import org.sonar.db.property.PropertyDto; | |||
import org.sonar.server.setting.ChildSettings; | |||
import static org.sonar.core.util.stream.MoreCollectors.uniqueIndex; | |||
@@ -17,7 +17,7 @@ | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.platform; | |||
package org.sonar.server.setting; | |||
import com.google.common.annotations.VisibleForTesting; | |||
import org.sonar.api.config.GlobalPropertyChangeHandler; |
@@ -18,6 +18,6 @@ | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
@ParametersAreNonnullByDefault | |||
package org.sonar.server.permission; | |||
package org.sonar.server.setting; | |||
import javax.annotation.ParametersAreNonnullByDefault; |
@@ -17,7 +17,7 @@ | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.settings; | |||
package org.sonar.server.setting; | |||
import com.google.common.collect.ImmutableList; | |||
import com.google.common.collect.ImmutableSet; |