diff --git a/.gitignore b/.gitignore
index 5ff6309..685c11a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,4 +35,5 @@ build/
.vscode/
### Mac OS ###
-.DS_Store
\ No newline at end of file
+.DS_Store
+/*/dependency-reduced-pom.xml
diff --git a/pom.xml b/pom.xml
index 486f2ba..523e318 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,18 +11,49 @@
com.keyware.sonar
sonar-keyware
- 1.0-SNAPSHOT
+ 1.0
pom
+
+
+ Keyware Private Terms
+ user must manually download and install the dependency.
+
+
+
+
+ 北京关键科技股份有限公司
+ http://www.keyware.cn
+
+
+ http://www.keyware.cn
+
+
+ scm:git:http://www.keyware.cn
+ scm:git:http://www.keyware.cn
+ http://www.keyware.cn
+ -
+
+
+
+ guoxinGuoXinKeyware
+ renfengjiangRenFengJiangKeyware
+ renfengshanRenFengShanKeyware
+ wuhaoyangWuHaoYangKeyware
+ zhangchenbaoZhangChenBaoKeyware
+
+
+
11
11
UTF-8
+ integration-tests/target/site/jacoco-aggregate/jacoco.xml
- sonar-dependencies
- sonar-keyware-plugins
+ sonar-keyware-plugins-cxx
+ sonar-keyware-plugins-java
diff --git a/sonar-dependencies/pom.xml b/sonar-dependencies/pom.xml
deleted file mode 100644
index e0a8c1c..0000000
--- a/sonar-dependencies/pom.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- 4.0.0
-
-
- com.keyware.sonar
- sonar-keyware
- 1.0-SNAPSHOT
-
-
- sonar-dependencies
- 1.0-SNAPSHOT
- pom
-
-
-
- sonar-java
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/sonar-dependencies/sonar-cxx b/sonar-dependencies/sonar-cxx
deleted file mode 160000
index dd3c88c..0000000
--- a/sonar-dependencies/sonar-cxx
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit dd3c88c7343f3a44c5172dc4499b361dda028d85
diff --git a/sonar-dependencies/sonar-java b/sonar-dependencies/sonar-java
deleted file mode 160000
index 0d3165c..0000000
--- a/sonar-dependencies/sonar-java
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 0d3165c6aebe18052b1d97893a2e3da85e6d9b41
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/pom.xml b/sonar-keyware-plugins-cxx/pom.xml
similarity index 67%
rename from sonar-keyware-plugins/sonar-keyware-plugins-cxx/pom.xml
rename to sonar-keyware-plugins-cxx/pom.xml
index ae7f82b..e22ac5c 100644
--- a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/pom.xml
+++ b/sonar-keyware-plugins-cxx/pom.xml
@@ -6,41 +6,27 @@
com.keyware.sonar
- sonar-keyware-plugins
- 1.0-SNAPSHOT
+ sonar-keyware
+ 1.0
C++ 信息安全性设计准则
sonar-keyware-plugins-cxx
+ 1.0
sonar-plugin
- 1.0-SNAPSHOT
用于检查C++源代码的安全性设计准则的Sonarqube插件
-
-
- Keyware Private Terms
- user must manually download and install the dependency.
-
-
-
-
- 北京关键科技股份有限公司
- http://www.keyware.cn
-
-
- http://www.keyware.cn
-
-
- scm:git:http://www.keyware.cn
- scm:git:http://www.keyware.cn
- http://www.keyware.cn
- -
-
-
+ target/${project.artifactId}-${project.version}.jar
+ com.keyware.sonar.cxx.CxxSecurityDesignPlugin
+ C++ 信息安全性设计准则
+
+ ${basedir}/../${aggregate.report.dir}
+
11
2.15.1
2.6
+ 2.1.2-SNAPSHOT
9.9.0.65466
9.14.0.375
@@ -56,82 +42,77 @@
- org.sonarsource.sonarqube-plugins.cxx
- cxx-sslr-toolkit
- ${project.basedir}/libs/cxx-sslr-toolkit-2.1.1.488.jar
- 2.1.1.488
- system
+ org.sonarsource.api.plugin
+ sonar-plugin-api
+ provided
+
+
+ org.sonarsource.sonarqube
+ sonar-plugin-api-impl
+ test
org.sonarsource.sonarqube-plugins.cxx
sonar-cxx-plugin
- ${project.basedir}/libs/sonar-cxx-plugin-2.1.1.488.jar
- 2.1.1.488
-
- system
+ ${sonar-cxx.versin}
+ provided
-
- org.sonarsource.api.plugin
- sonar-plugin-api
- ${sonar.plugin.api.version}
+ org.sonarsource.sonarqube-plugins.cxx
+ cxx-squid
+ ${sonar-cxx.versin}
-
- org.sonarsource.sonarqube
- sonar-plugin-api-impl
- ${sonar.version}
- compile
+ org.sonarsource.sonarqube-plugins.cxx
+ cxx-checks
+ ${sonar-cxx.versin}
-
- commons-io
- commons-io
- ${commons-io.version}
- test
+ org.sonarsource.sonarqube-plugins.cxx
+ cxx-sensors
+ ${sonar-cxx.versin}
- commons-lang
- commons-lang
- ${commons-lang.version}
+ org.sonarsource.sonarqube-plugins.cxx
+ cxx-squid-bridge
+ ${sonar-cxx.versin}
+
+ org.sonarsource.sonarqube-plugins.cxx
+ sslr-core
+ ${sonar-cxx.versin}
+
+
com.google.code.findbugs
jsr305
- ${jsr305.version}
com.google.guava
guava
- ${guava.version}
com.google.code.gson
gson
- ${gson.version}
org.mockito
mockito-core
- ${mockito-core.version}
test
org.assertj
assertj-core
- ${assertj-core.version}
test
org.junit.jupiter
- junit-jupiter-api
- ${junit-jupiter.version}
+ junit-jupiter-engine
test
org.junit.jupiter
- junit-jupiter-engine
- ${junit-jupiter.version}
+ junit-jupiter-api
test
@@ -142,8 +123,15 @@
org.sonarsource.sonar-packaging-maven-plugin
sonar-packaging-maven-plugin
+ true
- ${sonarQubeMinVersion}
+ keywareCxxPlugin
+ C++ 安全性设计准则
+ com.keyware.sonar.cxx.CxxSecurityDesignRulesPlugin
+ true
+ true
+ 9.14.0.375
+ java:${project.version}
@@ -165,6 +153,8 @@
+
+
src/main/resources
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/CxxSecurityDesignRulesPlugin.java b/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/CxxSecurityDesignRulesPlugin.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/CxxSecurityDesignRulesPlugin.java
rename to sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/CxxSecurityDesignRulesPlugin.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/CxxSecurityDesignRulesRepository.java b/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/CxxSecurityDesignRulesRepository.java
similarity index 93%
rename from sonar-keyware-plugins/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/CxxSecurityDesignRulesRepository.java
rename to sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/CxxSecurityDesignRulesRepository.java
index e2884e5..d1f4bbe 100644
--- a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/CxxSecurityDesignRulesRepository.java
+++ b/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/CxxSecurityDesignRulesRepository.java
@@ -10,7 +10,6 @@ import org.sonar.api.SonarEdition;
import org.sonar.api.SonarProduct;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
-import org.sonar.api.config.internal.MapSettings;
import org.sonar.api.resources.Language;
import org.sonar.api.server.rule.RulesDefinition;
import org.sonar.api.utils.Version;
@@ -49,7 +48,6 @@ public class CxxSecurityDesignRulesRepository extends CustomCxxRulesDefinition {
RulesDefinition.NewRepository repository = context.createRepository(REPOSITORY_KEY, "cxx").setName(REPOSITORY_NAME);
-
setTemplates(repository);
repository.done();
@@ -57,7 +55,11 @@ public class CxxSecurityDesignRulesRepository extends CustomCxxRulesDefinition {
@Override
public Language getLanguage() {
- return new CxxLanguage(new MapSettings().asConfig());
+ return new CxxLanguage(null) {
+ public String[] getFileSuffixes() {
+ return new String[]{".cxx", ".cpp", ".cc", ".c", ".hxx", ".hpp", ".hh", ".h"};
+ }
+ };
}
@Override
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/DemoChecker.java b/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/DemoChecker.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/DemoChecker.java
rename to sonar-keyware-plugins-cxx/src/main/java/com/keyware/sonar/cxx/rules/checkers/DemoChecker.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/src/main/resources/license-header.txt b/sonar-keyware-plugins-cxx/src/main/resources/license-header.txt
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-cxx/src/main/resources/license-header.txt
rename to sonar-keyware-plugins-cxx/src/main/resources/license-header.txt
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/pom.xml b/sonar-keyware-plugins-java/pom.xml
similarity index 88%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/pom.xml
rename to sonar-keyware-plugins-java/pom.xml
index a3dd071..5ef531f 100644
--- a/sonar-keyware-plugins/sonar-keyware-plugins-java/pom.xml
+++ b/sonar-keyware-plugins-java/pom.xml
@@ -6,45 +6,16 @@
com.keyware.sonar
- sonar-keyware-plugins
- 1.0-SNAPSHOT
+ sonar-keyware
+ 1.0
Java 信息安全性设计准则
sonar-keyware-plugins-java
sonar-plugin
- 1.0-SNAPSHOT
+ 1.0
用于检查Java源代码的安全性设计准则的Sonarqube插件
-
-
- Keyware Private Terms
- user must manually download and install the dependency.
-
-
-
-
- 北京关键科技股份有限公司
- http://www.keyware.cn
-
-
- http://www.keyware.cn
-
-
- scm:git:http://www.keyware.cn
- scm:git:http://www.keyware.cn
- http://www.keyware.cn
- -
-
-
-
- guoxinGuoXinKeyware
- renfengjiangRenFengJiangKeyware
- renfengshanRenFengShanKeyware
- wuhaoyangWuHaoYangKeyware
- zhangchenbaoZhangChenBaoKeyware
-
-
0.8.10
UTF-8
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/JavaSecurityDesignRulesPlugin.java b/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/JavaSecurityDesignRulesPlugin.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/JavaSecurityDesignRulesPlugin.java
rename to sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/JavaSecurityDesignRulesPlugin.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/JavaFileCheckRegistrar.java b/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/JavaFileCheckRegistrar.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/JavaFileCheckRegistrar.java
rename to sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/JavaFileCheckRegistrar.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/JavaSecurityDesignRulesRepository.java b/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/JavaSecurityDesignRulesRepository.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/JavaSecurityDesignRulesRepository.java
rename to sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/JavaSecurityDesignRulesRepository.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/RulesList.java b/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/RulesList.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/RulesList.java
rename to sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/RulesList.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/checkers/ABCVarNameChecker.java b/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/checkers/ABCVarNameChecker.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/checkers/ABCVarNameChecker.java
rename to sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/checkers/ABCVarNameChecker.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/resources/license-header.txt b/sonar-keyware-plugins-java/src/main/resources/license-header.txt
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/resources/license-header.txt
rename to sonar-keyware-plugins-java/src/main/resources/license-header.txt
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/resources/org/sonar/l10n/java/rules/java/ABCVarNameChecker.html b/sonar-keyware-plugins-java/src/main/resources/org/sonar/l10n/java/rules/java/ABCVarNameChecker.html
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/resources/org/sonar/l10n/java/rules/java/ABCVarNameChecker.html
rename to sonar-keyware-plugins-java/src/main/resources/org/sonar/l10n/java/rules/java/ABCVarNameChecker.html
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/resources/org/sonar/l10n/java/rules/java/ABCVarNameChecker.json b/sonar-keyware-plugins-java/src/main/resources/org/sonar/l10n/java/rules/java/ABCVarNameChecker.json
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/main/resources/org/sonar/l10n/java/rules/java/ABCVarNameChecker.json
rename to sonar-keyware-plugins-java/src/main/resources/org/sonar/l10n/java/rules/java/ABCVarNameChecker.json
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/files/ABCVarNameRule.java b/sonar-keyware-plugins-java/src/test/files/ABCVarNameRule.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/files/ABCVarNameRule.java
rename to sonar-keyware-plugins-java/src/test/files/ABCVarNameRule.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/JavaSecurityDesignRulesPluginTest.java b/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/JavaSecurityDesignRulesPluginTest.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/JavaSecurityDesignRulesPluginTest.java
rename to sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/JavaSecurityDesignRulesPluginTest.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/JavaFileCheckRegistrarTest.java b/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/JavaFileCheckRegistrarTest.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/JavaFileCheckRegistrarTest.java
rename to sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/JavaFileCheckRegistrarTest.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/JavaSecurityDesignRulesRepositoryTest.java b/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/JavaSecurityDesignRulesRepositoryTest.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/JavaSecurityDesignRulesRepositoryTest.java
rename to sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/JavaSecurityDesignRulesRepositoryTest.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/checkers/ABCVarNameCheckerTest.java b/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/checkers/ABCVarNameCheckerTest.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/checkers/ABCVarNameCheckerTest.java
rename to sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/rules/checkers/ABCVarNameCheckerTest.java
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/utils/FilesUtils.java b/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/utils/FilesUtils.java
similarity index 100%
rename from sonar-keyware-plugins/sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/utils/FilesUtils.java
rename to sonar-keyware-plugins-java/src/test/java/com/keyware/sonar/java/utils/FilesUtils.java
diff --git a/sonar-keyware-plugins/pom.xml b/sonar-keyware-plugins/pom.xml
deleted file mode 100644
index edb04b9..0000000
--- a/sonar-keyware-plugins/pom.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
- 4.0.0
-
-
- com.keyware.sonar
- sonar-keyware
- 1.0-SNAPSHOT
-
-
- sonar-keyware-plugins
- 1.0-SNAPSHOT
- pom
-
-
- sonar-keyware-plugins-java
- sonar-keyware-plugins-cxx
-
-
-
\ No newline at end of file
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/libs/cxx-sslr-toolkit-2.1.1.488.jar b/sonar-keyware-plugins/sonar-keyware-plugins-cxx/libs/cxx-sslr-toolkit-2.1.1.488.jar
deleted file mode 100644
index 85c50bf..0000000
Binary files a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/libs/cxx-sslr-toolkit-2.1.1.488.jar and /dev/null differ
diff --git a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/libs/sonar-cxx-plugin-2.1.1.488.jar b/sonar-keyware-plugins/sonar-keyware-plugins-cxx/libs/sonar-cxx-plugin-2.1.1.488.jar
deleted file mode 100644
index f30b775..0000000
Binary files a/sonar-keyware-plugins/sonar-keyware-plugins-cxx/libs/sonar-cxx-plugin-2.1.1.488.jar and /dev/null differ