Inspection: General - Problematic whitespace triggered unexpected

Hello,

i have a problem to understand the inspection rule "General - Problematic whitespace". According to https://www.jetbrains.com/help/phpstorm/general-problematic-whitespace.html they are 3 situation triggered by this rule. 

  1. Reports tabs used for indentation when the code style is configured to use only spaces.
  2. Reports spaces used for indentation when the code style is configured to use only tabs.
  3. Reports spaces used for indentation and tabs used for alignment when the code style is configured to use smart tabs.

1. and 2. are clear -> Trigger if CodeStyle is unequal formation in Code. 3. one i do not really understand. 

This is my current setting:

This my code:


My Question: Why this code triggers inspection 'General - Problematic whitespace' ?
If i use whitespaces the inspection 'General - Problematic whitespace' disappear
If i disable 'SmartTabs' the inspection 'General - Problematic whitespace' still appears -> so Part 3 of Inspection seems to has no effect 

What do i miss?

Thanks in advance

0
3 comments

You don't miss anything, the inspection appears to be fundamentally broken.
I reported it here: https://youtrack.jetbrains.com/issue/IDEA-242909

1

see comment in report https://youtrack.jetbrains.com/issue/IDEA-242909 "Do you have the code style for HTML files set to spaces?"

I tried this an it works. Not really understandable but thats fine for me. I can work with it. 

Thanks for help

 

Edit:
It does solve the simple cases, but still is triggered in more complex situation. 
I have set for each language to use TAB instead of space, but still the inspection appears in most of our files. Seems that PHPDoc is triggering this Inspection, and indeed PHPDoc use spaces, but i do not find any settings to modify it.

0

Could you please share these findings in the bug? Please paste the snippet as code there too, thanks!

Update: I ended up doing it myself, thanks again!

0

Please sign in to leave a comment.