SonarQube ignore getter/setters in code analysis

廉价感情. 提交于 2020-03-18 17:48:41

问题


Is there a setting in SonarQube dashboard that allows for ignoring getter and setters? This sounds like a better option then coding //nopmd on every method in your codebase.

My codebase has a lot of them and they are dramatically lowering my unit test coverage % being reported in the Sonarqube dashboard


回答1:


There is no option to ignore getters and setters. However, if you have classes you'd like omitted entirely from coverage calculations, you can easily do so with exclusions.



来源:https://stackoverflow.com/questions/48331440/sonarqube-ignore-getter-setters-in-code-analysis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!