Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Support remote analyze (Sonarcloud/SonarQube) #61

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

branch-* analysis

ae7f2b7
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

Draft: Support remote analyze (Sonarcloud/SonarQube) #61

branch-* analysis
ae7f2b7
Select commit
Loading
Failed to load commit list.
GitHub Actions / JUnit Tests succeeded Dec 28, 2023 in 0s

JUnit Tests ✅

Tests passed successfully

Report Passed Failed Skipped Time
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.NodeBundlePathResolverTest.xml 1✅ 2ms
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.remote.SonarLintRemoteEngineTest.xml 2✅ 85s
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintAnalyserIssueComparatorTest.xml 4✅ 47ms
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplJavaPluginTest.xml 4✅ 4s
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplJavascriptPluginTest.xml 5✅ 52s
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplPhpPluginTest.xml 1✅ 442ms
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplTest.xml 5✅ 1s
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplWebPluginTest.xml 1✅ 2s
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplXmlPluginTest.xml 1✅ 327ms
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintUtilsTest.xml 10s
target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintUtilsTest$ProjectBased.xml 19✅ 1⚪ 10s

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.NodeBundlePathResolverTest.xml

1 tests were completed in 2ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.NodeBundlePathResolverTest 1✅ 2ms

✅ com.github.philippefichet.sonarlint4netbeans.NodeBundlePathResolverTest

✅ resolve

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.remote.SonarLintRemoteEngineTest.xml

2 tests were completed in 85s with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.remote.SonarLintRemoteEngineTest 2✅ 85s

✅ com.github.philippefichet.sonarlint4netbeans.remote.SonarLintRemoteEngineTest

✅ remote
✅ remoteWithLocalChange

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintAnalyserIssueComparatorTest.xml

4 tests were completed in 47ms with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.SonarLintAnalyserIssueComparatorTest 4✅ 47ms

✅ com.github.philippefichet.sonarlint4netbeans.SonarLintAnalyserIssueComparatorTest

✅ sort(Issue, Issue, CompareOrder)[1] Sorting issue DefaultIssueTestImpl{severity=null, type=null, ruleKey=null, startLine=20, endLine=null, startLineOffset=30, endLineOffset=null, clientInputFile=FSClientInputFile{path=./src/test/resources/NewClass.java, relativePath=null, isTest=true, encoding=null}} and FIRST with order {3}
✅ sort(Issue, Issue, CompareOrder)[2] Sorting issue DefaultIssueTestImpl{severity=null, type=null, ruleKey=null, startLine=19, endLine=null, startLineOffset=15, endLineOffset=null, clientInputFile=FSClientInputFile{path=./src/test/resources/NewClass.java, relativePath=null, isTest=true, encoding=null}} and SECOND with order {3}
✅ compare(Issue, Issue, CompareOrder)[1] Compare issue DefaultIssueTestImpl{severity=null, type=null, ruleKey=null, startLine=20, endLine=null, startLineOffset=30, endLineOffset=null, clientInputFile=FSClientInputFile{path=./src/test/resources/NewClass.java, relativePath=null, isTest=true, encoding=null}} and FIRST with order {3}
✅ compare(Issue, Issue, CompareOrder)[2] Compare issue DefaultIssueTestImpl{severity=null, type=null, ruleKey=null, startLine=19, endLine=null, startLineOffset=15, endLineOffset=null, clientInputFile=FSClientInputFile{path=./src/test/resources/NewClass.java, relativePath=null, isTest=true, encoding=null}} and SECOND with order {3}

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplJavaPluginTest.xml

4 tests were completed in 4s with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplJavaPluginTest 4✅ 4s

✅ com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplJavaPluginTest

✅ analyze(SonarLintEngineTestConfiguration, List)[1}] analyze(SonarLintFileDemo.java with rule java:S115 but without java:S122 and java:S1118 to check CODE_SMELL CRITICAL)
✅ analyze(SonarLintEngineTestConfiguration, List)[2}] analyze(NewClass.java with rule java:S1133 but without java:S1186, java:S1598, java:S100, java:S1134, java:S2168 and java:S115  to check CODE_SMELL INFO)
✅ analyze(SonarLintEngineTestConfiguration, List)[3}] analyze(SonarLintFileDemo.java with rule java:S115 but without java:S1220 and S1118 rule with default parameters)
✅ analyze(SonarLintEngineTestConfiguration, List)[4}] analyze(SonarLintFileDemo.java with rule java:S115 but without java:S1220 and S1118 rule with custom parameters)

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplJavascriptPluginTest.xml

5 tests were completed in 52s with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplJavascriptPluginTest 5✅ 52s

✅ com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplJavascriptPluginTest

✅ analyze(SonarLintEngineTestConfiguration, List)[1}] analyze(sonarlint-example.js with rule javascript:S108 to check javascript plugin that require nodejs)
✅ analyze(SonarLintEngineTestConfiguration, List)[2}] analyze(sonarlint-example-with-global-variables.js with rule javascript:S3827 to check 3 issues from global variable declaring without extra properties "sonar.javascript.globals")
✅ analyze(SonarLintEngineTestConfiguration, List)[3}] analyze(sonarlint-example-with-global-variables.js with rule javascript:S3827 to check one issue from global variable declaring in extra properties "sonar.javascript.globals" for "globalVariables,api")
✅ analyze(SonarLintEngineTestConfiguration, List)[4}] analyze(sonarlint-example-with-global-variables.js with rule javascript:S3827 to check two issues from global variable declaring with extra properties "sonar.javascript.globals" for "AapiI")
✅ analyze(SonarLintEngineTestConfiguration, List)[5}] analyze(sonarlint-example.css with rule css:S1116 to check one issue on line "4")

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplPhpPluginTest.xml

1 tests were completed in 442ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplPhpPluginTest 1✅ 442ms

✅ com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplPhpPluginTest

✅ analyze(SonarLintEngineTestConfiguration, List)[1}] analyze(sonarlin-example.php with rule php:S101 but without php:S1105 to check php plugin)

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplTest.xml

5 tests were completed in 1s with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplTest 5✅ 1s

✅ com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplTest

✅ getRuleParameter
✅ getMergedExtraProperties(Map, Project, Map, Project, Map)[1] {p1=v1}, Mock for Project, hashCode: 254952533, {p1=v2}, Mock for Project, hashCode: 254952533, {p1=v2}
✅ getMergedExtraProperties(Map, Project, Map, Project, Map)[2] {p1=v1}, Mock for Project, hashCode: 254952533, {p1=v2}, null, {p1=v1}
✅ getMergedExtraProperties(Map, Project, Map, Project, Map)[3] {}, Mock for Project, hashCode: 254952533, {p1=v2}, null, {}
✅ getMergedExtraProperties(Map, Project, Map, Project, Map)[4] {}, Mock for Project, hashCode: 254952533, {p1=v2}, Mock for Project, hashCode: 254952533, {p1=v2}

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplWebPluginTest.xml

1 tests were completed in 2s with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplWebPluginTest 1✅ 2s

✅ com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplWebPluginTest

✅ analyze(SonarLintEngineTestConfiguration, List)[1}] analyze(sonarlin-example.php with rule php:S101 but without php:S1105 to check php plugin)

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplXmlPluginTest.xml

1 tests were completed in 327ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplXmlPluginTest 1✅ 327ms

✅ com.github.philippefichet.sonarlint4netbeans.SonarLintEngineImplXmlPluginTest

✅ analyze(SonarLintEngineTestConfiguration, List)[1}] analyze(sonarlin-example.php with rule php:S101 but without php:S1105 to check php plugin)

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintUtilsTest.xml

No tests found

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.SonarLintUtilsTest 10s

✅ target/surefire-reports/TEST-com.github.philippefichet.sonarlint4netbeans.SonarLintUtilsTest$ProjectBased.xml

20 tests were completed in 10s with 19 passed, 0 failed and 1 skipped.

Test suite Passed Failed Skipped Time
com.github.philippefichet.sonarlint4netbeans.SonarLintUtilsTest$ProjectBased 19✅ 1⚪ 10s

✅ com.github.philippefichet.sonarlint4netbeans.SonarLintUtilsTest$ProjectBased

com.github.philippefichet.sonarlint4netbeans.SonarLintUtilsTest
  ⚪ Check to search default nodeJS installation
  ✅ toTruncateURI(URI, int, String)[1] Given URI file:/source-code/my-project/src/main/java/com/example/Main.java When truncate to 100 characters Then path must be file:/source-code/my-project/src/main/java/com/example/Main.java.
  ✅ toTruncateURI(URI, int, String)[2] Given URI file:/source-code/my-project/src/main/java/com/example/Main.java When truncate to 11 characters Then path must be .../Main.java.
  ✅ toTruncateURI(URI, int, String)[3] Given URI file:/source-code/my-project/src/main/java/com/example/Main.java When truncate to 12 characters Then path must be .../example/Main.java.
  ✅ toTruncateURI(URI, int, String)[4] Given URI file:/source-code/my-project/src/main/java/com/example/Main.java When truncate to 40 characters Then path must be .../my-project/src/main/java/com/example/Main.java.
  ✅ toTruncateURI(URI, int, String)[5] Given URI file:///C:/Users/Main.java When truncate to 12 characters Then path must be .../Users/Main.java.
  ✅ toTruncateURI(URI, int, String)[6] Given URI file:///C:/Users/Main.java When truncate to 100 characters Then path must be file:///C:/Users/Main.java.
  ✅ getMergedExtraPropertiesAndReplaceVariables(Project, Map, Map)[1] null, {sonar.cfamily.compile-commands=${projectDir}/build/compile_commands.json}, {sonar.cfamily.compile-commands=${projectDir}/build/compile_commands.json}
  ✅ getMergedExtraPropertiesAndReplaceVariables(Project, Map, Map)[2] Mock for Project, hashCode: 233181189, {sonar.cfamily.compile-commands=${projectDir}/build/compile_commands.json}, {sonar.cfamily.compile-commands=/home/runner/work/sonarlint4netbeans/sonarlint4netbeans/build/compile_commands.json}
  ✅ Detect nodejs version
✅ Analyze hierarchical tree used in "Analyze with Sonarlint"
✅ Analyze with custom rule parameter value to check ${projectDir}
✅ Check custom rule parameter value from extractRuleParameters
✅ Check default rule parameter value from extractRuleParameters
✅ Analyze with custom rule parameter value on project with global scope
✅ Analyze with custom rule parameter value on project
✅ Analyze hierarchical tree used in "Analyze with Sonarlint" with a custom rule parameter value
✅ Check custom rule parameter value from extractRuleParameters on project with global scope
✅ Analyze with custom rule parameter value
✅ Analyze with extra properties on project