mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-82634 (Inspection warning on entire file not displayed)
This commit is contained in:
@@ -173,7 +173,7 @@ public abstract class BaseInspectionVisitor extends JavaElementVisitor {
|
||||
|
||||
protected final void registerError(@NotNull PsiElement location,
|
||||
Object... infos) {
|
||||
if (location.getTextLength() == 0) {
|
||||
if (location.getTextLength() == 0 && !(location instanceof PsiFile)) {
|
||||
return;
|
||||
}
|
||||
final InspectionGadgetsFix[] fixes = createFixes(infos);
|
||||
|
||||
@@ -6,4 +6,11 @@
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Empty class</problem_class>
|
||||
<description>Class <code>ReportMe</code> is empty #loc</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>EmptyFile.java</file>
|
||||
<line>1</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Empty class</problem_class>
|
||||
<description>Java file does not declare any class #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
Reference in New Issue
Block a user