[Improvement-11074]Add generated annotation to Lombok generated codes to make the code coverage results of Sonar more meaningful#11212
Merged
SbloodyS merged 1 commit intoapache:devfrom Aug 2, 2022
Conversation
f21a86a to
0ea9dd6
Compare
|
Kudos, SonarCloud Quality Gate passed! |
Member
|
Prefer to change the pr title to something like "Add generated annotation to Lombok generated codes to ..." |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Purpose of the pull request
To exclude the
Lombokgenerated code during the coverage tests and make the code coverage results ofSonarmore meaningful.#11074
Brief change log
add a
lombok.configfile in the root of the project and add the config below:which makes Lombok to add @lombok.Generated annotation to all generated methods so that Jacoco will automatically ignore the lombok auto generated code.
Ref:
https://community.sonarsource.com/t/getting-meaningful-coverage-results-in-sonarqube-when-using-jacoco-and-lombok/13821
https://projectlombok.org/features/configuration
And here is an example provided by @kezhenxu94 :
https://github.com/apache/skywalking/blob/master/lombok.config
Verify this pull request
This pull request is code cleanup without any test coverage.