TNO / knowledge-engine

Improves interoperability between systems (i.e. devices, platforms, apps, databases) by exchanging data based on their semantics
https://knowledge-engine.eu
Apache License 2.0
33 stars 4 forks source link

Static code analysis #361

Open Sophietje opened 2 years ago

Sophietje commented 2 years ago

In GitLab by @han.kruiger.tno.nl on Feb 11, 2022, 09:14

Possible options:

Sophietje commented 2 years ago

In GitLab by @barry.nouwt.tno.nl on Feb 18, 2022, 09:40

From within Eclipse I can run JaCoCo (Code Coverage) with the following results for the tests in the reasoner and smart connector Maven modules.

Element Coverage Covered Instructions Missed Instructions Total Instructions
reasoner 85,8 % 4.141 683 4.824
smart-connector 61,9 % 15.650 9.617 25.267
Sophietje commented 2 years ago

In GitLab by @han.kruiger.tno.nl on Feb 18, 2022, 09:49

Pretty nice, considering that we never really optimized for high coverage :thumbsup:

Sophietje commented 2 years ago

In GitLab by @han.kruiger.tno.nl on Feb 18, 2022, 09:51

Does it also give warnings for 'code smell' and other static analysis? Can we integrate it in maven?

Sophietje commented 2 years ago

In GitLab by @barry.nouwt.tno.nl on Feb 18, 2022, 10:25

Yes, something to be proud of!

Sophietje commented 2 years ago

In GitLab by @barry.nouwt.tno.nl on Feb 18, 2022, 10:27

How I used it currently, it did not. I know SonarQube does this and it integrates with Eclipse as well. Regarding integration with Maven that is certainly possible with SonarQube. It automatically generates reports on that, I think. See https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/