Show a warning when the issue analysis is suspended due to the Power Save Mode

Hey SonarLink team,

Following the issue described at StackOverflow: SonarLint plugin for IntelliJ IDEA suddenly stopped working - shows “No issues to display”, could you please consider to show some warning when the plugin stops working because of the Power Save Mode is turned on?

It doesn’t matter if the Power Save Mode is turned on accidentally or intentionally - in any case it is very counter-intuitive when the plugin just shows “No issues to display” instead of something clearer, such as “Due to Power Save Mode the analysis was suspended” or similar.

Of course supposed that this behaviour (stopping the analysis) is intended and not a bug :slight_smile:

Hello @Honza,

thank you for reaching out to us. We actually display some information on the Current File tab of the SonarLint tool window when the power save mode is enabled.
This is to remind the user of the implications for the SonarLint plug-in while the pop-up displayed by IntelliJ itself for the power save mode being enabled is more general and we cannot add our own information to it.

The analysis not being automatic for the opened file is not a bug that happens but is due to IntelliJ switching to the power save mode. It is the behavior of plug-ins to lower power consumption.

Best,
Tobias

Thanks, tobias.hahnen . It would be good if the same information is shown also on the “Report” tab, it is really confusing. Even the information in the statusbar is not very much visible, I noticed it only after you told me so :slight_smile: Otherwise what I saw was only “No analysis done on the current file”.

And there is a button under it “Analyze Current File”, which does not do anything. This is in my opinion a bug - because this is not anymore a background activity (where IntelliJ saves power), it is an on-demand action, which simply does not react, without any message.

@nicolas.quinquenel are you aware of the “bug” the user is describing? I’ve tested it by enabling power save mode, changing the currently opened file by adding a
// TODO: Comment
and then press the Analyze Current File button. There won’t be an issue shown but the log displays
File 'Test.java' excluded: power save mode is enabled
If I’m not mistaken in a previous version the button was greyed out when the power save mode was on so we couldn’t analyze it in the first place anyway.

I do agree with the user that the information only shown in the Current File tab is a bit unfortunate but I think this also has something to do with all the tabs looking completely different - I think this might be worth fixing when at some point the tabs are aligned a bit more.

Exactly! Who would go to look into the log when there is no apparent error and the message says “No issues found”, not “No issues search for”.

Hi @Honza,

based on your input and on the investigation done on my side I created THIS ticket to overhaul the information we display and the way we react to the Power Save Mode.

Thank you very much for engaging with us!

Best,
Tobias

1 Like

there is a button under it “Analyze Current File”, which does not do anything. This is in my opinion a bug - because this is not anymore a background activity (where IntelliJ saves power), it is an on-demand action, which simply does not react, without any message.

When using SonarLint in power save mode, we don’t trigger any analysis, even when it’s a manually triggered analysis. So, I agree that the current workflow is slightly misleading.

The solution that would make the most sense would be to allow manual analysis, the only drawback is that code insight, including inspections, is disabled. So, as far as I know, we don’t have a way to highlight those issues when power save mode is enabled, but they will be listed in the SonarLint tool window nonetheless.

Fast and sufficient solution would be to clearly and visibly tell the user that because of the Power Save Mode all the analysis is turned off. This would be understandable enough.

Enabling the manual analysis is only another step towards better perfection :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.