Project-Books / books-api

GraphQL Books API
https://project-books.github.io/#books-api
MIT License
36 stars 61 forks source link

Exclude certain files from JaCoCo reports #122

Closed knjk04 closed 3 years ago

knjk04 commented 3 years ago

We don't want the test coverage to include:

Wildschut commented 3 years ago

Hi, can I be assigned this issue?

knjk04 commented 3 years ago

Hi, sure, I'll assign you to the issue. Thanks!

knjk04 commented 3 years ago

@Wildschut For some reason, SonarCloud is not ignoring these: https://sonarcloud.io/component_measures?id=Project-Books_books-api&metric=coverage&view=list

Wildschut commented 3 years ago

Hi, will have to take a look later.

Can you expand on the expected result?

The way I verified was checking the target/sites/index.html for any occurences of the packages.

There wasn't so I commited and created the PR...

knjk04 commented 3 years ago

I was hoping that it would ignore the model classes and the main class from the code coverage. I'm not sure why the code coverage percentage has gone down. There is a way of manually excluding paths in SonarCloud, but I thought the JaCoCo approach would work

Wildschut commented 3 years ago

Hi @knjk04 ,

I'm not sure how to interpret the results of the https://sonarcloud.io/dashboard?id=Project-Books_books-api&pullRequest=138.

I think its only analyzing the changed pom?

How can I verify the changes made are the intended result? Tried setting up my own sonarqube but I don't have enough know how right now to do it timeously.

knjk04 commented 3 years ago

Something seems to be going wrong with Sonar because it's now pointing to the Book Project. I'll re-close this issue and investigate further on my end. Thanks!