kezhenxu94 commented on PR #11133:
URL: 
https://github.com/apache/dolphinscheduler/pull/11133#issuecomment-1195168073

   > > Use `@Data` to replace `@Getter, @Setter, @ToString`
   > 
   > 
   > 
   > Hi @kezhenxu94, when I was working on Zeppelin task plugin, I used `@Data` 
to refactor `ZeppelinParameters` at first and caused `sonar` to fail because of 
a significant decrease in UT coverage. After checking some materials, I found 
`@Data` generates some code we do not need here. After replacing it with 
`@Getter` `@Setter` and `ToString`, the UT coverage recovered. So there might 
be a trade-off between code briefness and UT coverage. 
   > 
   > Some related materials: 
   > 
   > * 
https://stackoverflow.com/questions/45569085/sonarqube-bad-coverage-because-of-lombok-data
 and https://projectlombok.org/features/Data
   > 
   > * https://projectlombok.org/features/Data
   > 
   > 
   > 
   > WDYT?
   
   We should be able to exclude generated codes from Sonar


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to