What's the deal with inspections such as "There should be a space between attribute and previous attribute" which cannot be checked using Inspect Code or turned off?

I really don't understand how this works. These inspections don't exist in Settings - Editor - Inspections and they have no context actions to suggest @noinspection or an automatic fix, which means that I can't turn them off or change their warning level, and I can't check the entire project for these inspections without manually opening literally every single file.

What's the deal with these inspections? Why do they work in such an awkward way? And is there even a full list of them I can see somewhere in the IDE?

0

Syntax errors inspections cannot be turned off, that's by default.
Do I get right that you are referring to this bug? https://youtrack.jetbrains.com/issue/WEB-26240

0

I did have that bug in mind, but I was asking more generally about the underlying system, I'm struggling to understand how this works.

You said it's a syntax error inspection, but surely if it's a syntax error there should be a way to see syntax errors across the whole project? If not, that seems like an oversight, especially in non-compiled languages. I see it appears in the new Problems tool window, but there is only a "Current File" tab and no option for "All Files" or a custom scope.

It's also strange to me that a syntax error is only classified as a Warning, not an Error, so it's easy to ignore and difficult to fix later since you cannot see every file that triggers the inspection.

0

You said it's a syntax error inspection, but surely if it's a syntax error there should be a way to see syntax errors across the whole project?

Makes sense. And there is such way, syntax errors appear when you run Code | Inspect Code.

But this one doesn't. I had to check the actual code, and it seems that apart from inspections and syntax checks there's also something called highlight info, which only appears when the file is open.

This particular message is actually an XML message, it's also being used to check HTML, and in case of XML it would've been an error, but in case of HTML, the severity of it is mitigated to Warning.

Either way, there's no way you can disable it apart from disabling all checks for PHP in this case (I don't know why an XML inspection falls under the PHP slider).

0

> apart from inspections and syntax checks there's also something called highlight info

That makes sense, thank you for checking. I'm personally not too worried about disabling them, however I would definitely like a way to check all 'highlight info' inspections across the project. I looked around YouTrack and could not find such suggestion, but it's possible it's just difficult to find what it'd be called since 'highlight info' is probably not a well known term. Shall I open a new issue then, with a suggestion to implement an 'All Files' tab into the new Problems panel? I think it'd be a good place for it, since the highlights show up there already.

0

A little update - it turned out that this XML highlighting actually appears in the Inspect Code results, but only if you analyze an XML or an HTML file.
If the XML/HTML is injected, it doesn't make its way in there.
It's not that all injections are not being inspected, it's this particular inspection (or whatever it is) is not registered in this case.
It's valid for Java too:

public class MyCustomClass {
    public void myXml() {
        //language=XML
        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><sqlstatement name=\"active_languages\"lkjl=\"kjlk\"><query></query></sqlstatement>\n";
    }
}

If that bothers you, yes, probably it makes sense to submit this as a bug report: https://youtrack.jetbrains.com/newIssue?project=WI

0

请先登录再写评论。