Skip to content

Commit 147babc

Browse files
authored
Merge pull request #26 from marcphilipp/sonarqube67
Update to SonarQube LTS 6.7
2 parents 321dc1a + d3a672f commit 147babc

File tree

163 files changed

+1773
-2474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+1773
-2474
lines changed

erlang-checks/pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@
1616
<groupId>${project.groupId}</groupId>
1717
<artifactId>erlang-squid</artifactId>
1818
</dependency>
19-
19+
<dependency>
20+
<groupId>org.sonarsource.sslr</groupId>
21+
<artifactId>sslr-xpath</artifactId>
22+
</dependency>
23+
<dependency>
24+
<groupId>commons-lang</groupId>
25+
<artifactId>commons-lang</artifactId>
26+
</dependency>
2027
<dependency>
2128
<groupId>org.hamcrest</groupId>
2229
<artifactId>hamcrest-all</artifactId>
@@ -31,6 +38,10 @@
3138
<groupId>org.easytesting</groupId>
3239
<artifactId>fest-assert</artifactId>
3340
</dependency>
41+
<dependency>
42+
<groupId>com.google.guava</groupId>
43+
<artifactId>guava</artifactId>
44+
</dependency>
3445
<dependency>
3546
<groupId>ch.qos.logback</groupId>
3647
<artifactId>logback-classic</artifactId>
@@ -41,6 +52,7 @@
4152
<artifactId>mockito-all</artifactId>
4253
<scope>test</scope>
4354
</dependency>
55+
4456
</dependencies>
4557

4658
</project>

erlang-checks/src/main/java/org/sonar/erlang/checks/BlockSeparatorCharacterCheck.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* SonarQube Erlang Plugin
3-
* Copyright (C) 2012 Tamas Kende
3+
* Copyright (C) 2012-2017 Tamas Kende
44
* kende.tamas@gmail.com
55
*
66
* This program is free software; you can redistribute it and/or
@@ -13,26 +13,23 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package org.sonar.erlang.checks;
2121

2222

23-
import org.sonar.api.server.rule.RulesDefinition;
2423
import org.sonar.check.BelongsToProfile;
2524
import org.sonar.check.Priority;
2625
import org.sonar.check.Rule;
2726
import org.sonar.check.RuleProperty;
2827
import org.sonar.squidbridge.annotations.SqaleConstantRemediation;
29-
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic;
3028
import org.sonar.squidbridge.checks.AbstractCommentRegularExpressionCheck;
3129
import org.sonar.sslr.parser.LexerlessGrammar;
3230

3331
@Rule(key = "BlockSeparatorCharacter", priority = Priority.MAJOR)
3432
@BelongsToProfile(title = CheckList.REPOSITORY_NAME, priority = Priority.MAJOR)
35-
@SqaleSubCharacteristic(RulesDefinition.SubCharacteristics.READABILITY)
3633
@SqaleConstantRemediation("1min")
3734
public class BlockSeparatorCharacterCheck extends
3835
AbstractCommentRegularExpressionCheck<LexerlessGrammar> {

erlang-checks/src/main/java/org/sonar/erlang/checks/BranchesOfRecursionCheck.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* SonarQube Erlang Plugin
3-
* Copyright (C) 2012 Tamas Kende
3+
* Copyright (C) 2012-2017 Tamas Kende
44
* kende.tamas@gmail.com
55
*
66
* This program is free software; you can redistribute it and/or
@@ -13,30 +13,27 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package org.sonar.erlang.checks;
2121

2222
import com.sonar.sslr.api.AstNode;
23-
import org.sonar.api.server.rule.RulesDefinition;
2423
import org.sonar.check.BelongsToProfile;
2524
import org.sonar.check.Priority;
2625
import org.sonar.check.Rule;
2726
import org.sonar.check.RuleProperty;
2827
import org.sonar.erlang.api.ErlangMetric;
2928
import org.sonar.erlang.parser.ErlangGrammarImpl;
3029
import org.sonar.squidbridge.annotations.SqaleConstantRemediation;
31-
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic;
3230
import org.sonar.squidbridge.api.SourceFunction;
3331
import org.sonar.squidbridge.checks.ChecksHelper;
3432
import org.sonar.squidbridge.checks.SquidCheck;
3533
import org.sonar.sslr.parser.LexerlessGrammar;
3634

3735
@Rule(key = "BranchesOfRecursion", priority = Priority.MAJOR)
3836
@BelongsToProfile(title = CheckList.REPOSITORY_NAME, priority = Priority.MAJOR)
39-
@SqaleSubCharacteristic(RulesDefinition.SubCharacteristics.LOGIC_CHANGEABILITY)
4037
@SqaleConstantRemediation("1h")
4138
public class BranchesOfRecursionCheck extends SquidCheck<LexerlessGrammar> {
4239

erlang-checks/src/main/java/org/sonar/erlang/checks/CheckList.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* SonarQube Erlang Plugin
3-
* Copyright (C) 2012 Tamas Kende
3+
* Copyright (C) 2012-2017 Tamas Kende
44
* kende.tamas@gmail.com
55
*
66
* This program is free software; you can redistribute it and/or
@@ -13,9 +13,9 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package org.sonar.erlang.checks;
2121

@@ -33,7 +33,7 @@ private CheckList() {
3333
}
3434

3535
public static List<Class> getChecks() {
36-
return ImmutableList.<Class>of(BlockSeparatorCharacterCheck.class,
36+
return ImmutableList.of(BlockSeparatorCharacterCheck.class,
3737
BranchesOfRecursionCheck.class, CommentRegularExpressionCheck.class,
3838
DepthOfCasesCheck.class, DoNotUseEmptyFlowControlCheck.class, DoNotUseImportCheck.class, DoNotUseExportAllCheck.class,
3939
ExportOneFunctionPerLineCheck.class, FunctionComplexityCheck.class, FunExpressionComplexityCheck.class,

erlang-checks/src/main/java/org/sonar/erlang/checks/CommentContainsPatternChecker.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* SonarQube Erlang Plugin
3-
* Copyright (C) 2012 Tamas Kende
3+
* Copyright (C) 2012-2017 Tamas Kende
44
* kende.tamas@gmail.com
55
*
66
* This program is free software; you can redistribute it and/or
@@ -13,20 +13,21 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package org.sonar.erlang.checks;
2121

2222
import com.sonar.sslr.api.Token;
2323
import com.sonar.sslr.api.Trivia;
24-
import org.apache.commons.lang.StringUtils;
25-
import org.sonar.squidbridge.checks.SquidCheck;
2624

2725
import java.util.Arrays;
2826
import java.util.List;
2927

28+
import org.apache.commons.lang.StringUtils;
29+
import org.sonar.squidbridge.checks.SquidCheck;
30+
3031
public class CommentContainsPatternChecker {
3132

3233
private final SquidCheck<?> check;

erlang-checks/src/main/java/org/sonar/erlang/checks/CommentRegularExpressionCheck.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* SonarQube Erlang Plugin
3-
* Copyright (C) 2012 Tamas Kende
3+
* Copyright (C) 2012-2017 Tamas Kende
44
* kende.tamas@gmail.com
55
*
66
* This program is free software; you can redistribute it and/or
@@ -13,9 +13,9 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package org.sonar.erlang.checks;
2121

erlang-checks/src/main/java/org/sonar/erlang/checks/DepthOfCasesCheck.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* SonarQube Erlang Plugin
3-
* Copyright (C) 2012 Tamas Kende
3+
* Copyright (C) 2012-2017 Tamas Kende
44
* kende.tamas@gmail.com
55
*
66
* This program is free software; you can redistribute it and/or
@@ -13,27 +13,24 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package org.sonar.erlang.checks;
2121

2222
import com.sonar.sslr.api.AstNode;
23-
import org.sonar.api.server.rule.RulesDefinition;
2423
import org.sonar.check.BelongsToProfile;
2524
import org.sonar.check.Priority;
2625
import org.sonar.check.Rule;
2726
import org.sonar.check.RuleProperty;
2827
import org.sonar.erlang.parser.ErlangGrammarImpl;
2928
import org.sonar.squidbridge.annotations.SqaleConstantRemediation;
30-
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic;
3129
import org.sonar.squidbridge.checks.SquidCheck;
3230
import org.sonar.sslr.parser.LexerlessGrammar;
3331

3432
@Rule(key = "DepthOfCases", priority = Priority.MAJOR)
3533
@BelongsToProfile(title = CheckList.REPOSITORY_NAME, priority = Priority.MAJOR)
36-
@SqaleSubCharacteristic(RulesDefinition.SubCharacteristics.LOGIC_CHANGEABILITY)
3734
@SqaleConstantRemediation("1h")
3835
public class DepthOfCasesCheck extends SquidCheck<LexerlessGrammar> {
3936

erlang-checks/src/main/java/org/sonar/erlang/checks/DoNotUseEmptyFlowControlCheck.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* SonarQube Erlang Plugin
3-
* Copyright (C) 2012 Tamas Kende
3+
* Copyright (C) 2012-2017 Tamas Kende
44
* kende.tamas@gmail.com
55
*
66
* This program is free software; you can redistribute it and/or
@@ -13,31 +13,29 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package org.sonar.erlang.checks;
2121

2222
import com.google.common.base.Predicates;
2323
import com.google.common.collect.Collections2;
2424
import com.google.common.collect.ImmutableList;
2525
import com.sonar.sslr.api.AstNode;
26-
import org.sonar.api.server.rule.RulesDefinition;
26+
27+
import java.util.List;
28+
2729
import org.sonar.check.BelongsToProfile;
2830
import org.sonar.check.Priority;
2931
import org.sonar.check.Rule;
3032
import org.sonar.erlang.parser.ErlangGrammarImpl;
3133
import org.sonar.squidbridge.annotations.SqaleConstantRemediation;
32-
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic;
3334
import org.sonar.squidbridge.checks.SquidCheck;
3435
import org.sonar.sslr.parser.LexerlessGrammar;
3536

36-
import java.util.List;
37-
3837
@Rule(key = "DoNotUseEmptyFlowControl", priority = Priority.MINOR)
3938
@BelongsToProfile(title = CheckList.REPOSITORY_NAME, priority = Priority.MAJOR)
40-
@SqaleSubCharacteristic(RulesDefinition.SubCharacteristics.LOGIC_RELIABILITY)
4139
@SqaleConstantRemediation("5min")
4240
public class DoNotUseEmptyFlowControlCheck extends SquidCheck<LexerlessGrammar> {
4341

erlang-checks/src/main/java/org/sonar/erlang/checks/DoNotUseExportAllCheck.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* SonarQube Erlang Plugin
3-
* Copyright (C) 2012 Tamas Kende
3+
* Copyright (C) 2012-2017 Tamas Kende
44
* kende.tamas@gmail.com
55
*
66
* This program is free software; you can redistribute it and/or
@@ -13,27 +13,24 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package org.sonar.erlang.checks;
2121

2222
import com.sonar.sslr.api.AstNode;
23-
import org.sonar.api.server.rule.RulesDefinition;
2423
import org.sonar.check.BelongsToProfile;
2524
import org.sonar.check.Priority;
2625
import org.sonar.check.Rule;
2726
import org.sonar.check.RuleProperty;
2827
import org.sonar.erlang.parser.ErlangGrammarImpl;
2928
import org.sonar.squidbridge.annotations.SqaleConstantRemediation;
30-
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic;
3129
import org.sonar.squidbridge.checks.SquidCheck;
3230
import org.sonar.sslr.parser.LexerlessGrammar;
3331

3432
@Rule(key = "DoNotUseExportAll", priority = Priority.MINOR)
3533
@BelongsToProfile(title = CheckList.REPOSITORY_NAME, priority = Priority.MAJOR)
36-
@SqaleSubCharacteristic(RulesDefinition.SubCharacteristics.LOGIC_RELIABILITY)
3734
@SqaleConstantRemediation("10min")
3835
public class DoNotUseExportAllCheck extends SquidCheck<LexerlessGrammar> {
3936

erlang-checks/src/main/java/org/sonar/erlang/checks/DoNotUseImportCheck.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* SonarQube Erlang Plugin
3-
* Copyright (C) 2012 Tamas Kende
3+
* Copyright (C) 2012-2017 Tamas Kende
44
* kende.tamas@gmail.com
55
*
66
* This program is free software; you can redistribute it and/or
@@ -13,26 +13,23 @@
1313
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1414
* Lesser General Public License for more details.
1515
*
16-
* You should have received a copy of the GNU Lesser General Public
17-
* License along with this program; if not, write to the Free Software
18-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1919
*/
2020
package org.sonar.erlang.checks;
2121

2222
import com.sonar.sslr.api.AstNode;
23-
import org.sonar.api.server.rule.RulesDefinition;
2423
import org.sonar.check.BelongsToProfile;
2524
import org.sonar.check.Priority;
2625
import org.sonar.check.Rule;
2726
import org.sonar.erlang.parser.ErlangGrammarImpl;
2827
import org.sonar.squidbridge.annotations.SqaleConstantRemediation;
29-
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic;
3028
import org.sonar.squidbridge.checks.SquidCheck;
3129
import org.sonar.sslr.parser.LexerlessGrammar;
3230

3331
@Rule(key = "DoNotUseImport", priority = Priority.MINOR)
3432
@BelongsToProfile(title = CheckList.REPOSITORY_NAME, priority = Priority.MAJOR)
35-
@SqaleSubCharacteristic(RulesDefinition.SubCharacteristics.UNDERSTANDABILITY)
3633
@SqaleConstantRemediation("10min")
3734
public class DoNotUseImportCheck extends SquidCheck<LexerlessGrammar> {
3835

0 commit comments

Comments
 (0)