![](/img/trans.png)
[英]Google CodeStyle for Eclipse formatter shows version warning
[英]Sonar produces a warning that eclipse can't solve with formatter
我收到一個聲納警告,因為它對這種語法不滿意:
new Thread() {
/**
* {@inheritDoc}
*/
@Override
public void run() {
}
}.start();
更具體地說,它在任何'}'之后要求一個空格(並且在.start()
之前沒有空格)。 我怎樣才能在eclipse中設置它?
我試過去Window - > Perferences - > Formatter - > Edit - > White Space但是我沒有看到在.start之前添加空格的選項。
你可以在Sonar中禁用這個規則,它幾乎沒用。
為此,請轉到“設置 - >質量配置文件”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.