diff --git a/.gitignore b/.gitignore index eb2b9fe..117b324 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ build/ ### Mac OS ### .DS_Store /*/dependency-reduced-pom.xml + +### Sonarqube ### +.scannerwork/ diff --git a/pom.xml b/pom.xml index d445169..748a6dc 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,6 @@ sonar-keyware-plugins-cxx sonar-keyware-plugins-java - soanr-keyware-example diff --git a/soanr-keyware-example/src/main/cxx/.scannerwork/.sonar_lock b/soanr-keyware-example/src/main/cxx/.scannerwork/.sonar_lock deleted file mode 100644 index e69de29..0000000 diff --git a/soanr-keyware-example/src/main/cxx/.scannerwork/class-mapping.csv b/soanr-keyware-example/src/main/cxx/.scannerwork/class-mapping.csv deleted file mode 100644 index e69de29..0000000 diff --git a/soanr-keyware-example/src/main/cxx/.scannerwork/report-task.txt b/soanr-keyware-example/src/main/cxx/.scannerwork/report-task.txt deleted file mode 100644 index c9190ad..0000000 --- a/soanr-keyware-example/src/main/cxx/.scannerwork/report-task.txt +++ /dev/null @@ -1,6 +0,0 @@ -projectKey=cxx-test -serverUrl=http://localhost:9000 -serverVersion=10.2.1.78527 -dashboardUrl=http://localhost:9000/dashboard?id=cxx-test -ceTaskId=AYz7dGiT3PoYkLIOzDsz -ceTaskUrl=http://localhost:9000/api/ce/task?id=AYz7dGiT3PoYkLIOzDsz diff --git a/uut-example/cxx/README.md b/uut-example/cxx/README.md new file mode 100644 index 0000000..783926c --- /dev/null +++ b/uut-example/cxx/README.md @@ -0,0 +1,4 @@ +```shell +# 执行扫描 +sonar-scanner -Dsonar.projectKey=cxx-test -Dsonar.sources=. -Dsonar.host.url=http://localhost:9000 -Dsonar.token=sqp_3d4a4b9b4d7381682f18250a463f1a789bc9c9bd +``` \ No newline at end of file diff --git a/soanr-keyware-example/src/main/cxx/ABCVarNameChecker.cc b/uut-example/cxx/src/ABCVarNameChecker.cc similarity index 67% rename from soanr-keyware-example/src/main/cxx/ABCVarNameChecker.cc rename to uut-example/cxx/src/ABCVarNameChecker.cc index 3724629..bac6bb5 100644 --- a/soanr-keyware-example/src/main/cxx/ABCVarNameChecker.cc +++ b/uut-example/cxx/src/ABCVarNameChecker.cc @@ -3,4 +3,8 @@ int main(void){ int ABC = 1; // error int abc = 2; return 0; +} + +void func1(){ + // TODO: add more tests } \ No newline at end of file diff --git a/soanr-keyware-example/.gitignore b/uut-example/java/.gitignore similarity index 100% rename from soanr-keyware-example/.gitignore rename to uut-example/java/.gitignore diff --git a/uut-example/java/README.md b/uut-example/java/README.md new file mode 100644 index 0000000..78ad575 --- /dev/null +++ b/uut-example/java/README.md @@ -0,0 +1,4 @@ +```shell +# 执行扫描 + +``` \ No newline at end of file diff --git a/soanr-keyware-example/pom.xml b/uut-example/java/pom.xml similarity index 96% rename from soanr-keyware-example/pom.xml rename to uut-example/java/pom.xml index 517e5da..d791071 100644 --- a/soanr-keyware-example/pom.xml +++ b/uut-example/java/pom.xml @@ -10,7 +10,7 @@ - soanr-keyware-example + uut-example 1.0 diff --git a/soanr-keyware-example/src/main/java/com/keyware/sonar/Main.java b/uut-example/java/src/main/java/com/keyware/sonar/Main.java similarity index 100% rename from soanr-keyware-example/src/main/java/com/keyware/sonar/Main.java rename to uut-example/java/src/main/java/com/keyware/sonar/Main.java diff --git a/soanr-keyware-example/src/main/resources/license-header.txt b/uut-example/java/src/main/resources/license-header.txt similarity index 100% rename from soanr-keyware-example/src/main/resources/license-header.txt rename to uut-example/java/src/main/resources/license-header.txt