Hi Dale,

Unfortunately, the configuration of the coverage checks didn’t work anyway so 
they didn’t inherit a not working config. I just noticed that the rules are 
parameters of the “check” goal. So, I added an execution of that goal to the 
build. Also, I moved the configuration to a self-activating java profile so now 
they are working in the Edgent module too and there the report says:

[INFO] --- jacoco-maven-plugin:0.7.9:check (check-coverage) @ apache-edgent ---
[INFO] Loading execution data file 
/Users/christofer.dutz/Projects/Apache/PLC4X/integrations/apache-edgent/target/target/coverage-reports/jacoco-ut.exec
[INFO] Analyzed bundle 'apache-edgent' with 5 classes
[INFO] All coverage checks have been met.

Good job :-)

I however had to prevent failing coverage reports to break the build as the 
camel integration is less well tested:

[INFO] --- jacoco-maven-plugin:0.7.9:check (check-coverage) @ apache-camel ---
[INFO] Loading execution data file 
/Users/christofer.dutz/Projects/Apache/PLC4X/integrations/apache-camel/target/target/coverage-reports/jacoco-ut.exec
[INFO] Analyzed bundle 'apache-camel' with 4 classes
[WARNING] Rule violated for bundle apache-camel: instructions covered ratio is 
0.00, but expected minimum is 0.50
[WARNING] Rule violated for bundle apache-camel: classes missed count is 4, but 
expected maximum is 0
[WARNING] Coverage checks have not been met. See log for details.

It would be cool if the camel adapter could receive some tests ;-)

Chris


Am 08.01.18, 18:36 schrieb "Dale LaBossiere" <[email protected]>:

    On the topic of coverage…
    
    The way the “integrations” are setup, they aren’t inheriting the “Fail the 
build” config setup in plc4j/pom.xml.
    Is that intentional?  Should that config be pushed up into the top level 
pom, or duplicated in integrations/pom.xml (or individual integrations)?
    
    Also it would be helpful if DEVELOPMENT.md were updated to capture the “how 
to run sonar locally” info below.
    
    Thanks!
    — Dale
    
    > On Jan 6, 2018, at 12:32 PM, Christofer Dutz <[email protected]> 
wrote:
    > 
    > Hi Justin,
    > 
    > well I just installed and started a local sonarqube server and executed 
this:
    > 
    > clean install sonar:sonar -Dsonar.host.url=http://localhost:9000/
    > 
    > And it worked file.
    > 
    > Chris
    > 
    > Am 06.01.18, 01:24 schrieb "Justin Mclean" <[email protected]>:
    > 
    >    Hi,
    > 
    >    I've see you changed it so that running locally no longer works and 
it’s publishing to Apache builds.
    > 
    >    That’s great but how would I test my changes and run sonar locally 
before having to commit changes?
    > 
    >    Thanks,
    >    Justin
    > 
    
    

Reply via email to