Set warning instead of error : inspection "Java | Javadoc"

已回答

Hello everyone,

I found something odd, Intellij is identifying significant amount of "Identifier Expected" error in Javadoc of a legacy application, we want any issue with javadoc to be a warning and never an error.

Changed in Settings > Editor > Inspections > "Java | Javadoc" severity and highlighting to Warning, and no effect still having error “identifier expected” in javadoc.

Example to replicate add the following to a field or a method:

/**
 * Description
 * @exception MyException.
 * 
 */

Using IntelliJ IDEA 2023.2.4 (Ultimate Edition) in macOs

 

Thanks for any help you can supply,

Best regards,

J.

0

Hello,

Do you need to have dot after “MyException”?

1

Hello Yaroslav, 

Yes there is a dot, and if I remove it, or if I add a space before the dot the error goes away. But this is not just in one java class, In almost every file in this legacy project (and they are a lot of them).

Side note. MyException is actually a test I made, in the project there are multiple types of Exception, I just made an simpler example to replicate without using the legacy application existing code. Extra bonus, this way I make sure this issue is replicatable on a clean project, and I fully comply with the multiple company policies involved.

public class Main {
    /**
     * Description
     * @exception MyException.
     *
     */
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}

0

Seems we have related issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-235186/Identifier-expected-in-Javadoc-doesnt-provide-fix

Please describe your case in comments to the issue.

1

请先登录再写评论。