Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include a file in sonar lint for analysis if it was excluded?

I clicked on "exclude" within the sonarlint menuin eclise for a file. Now i can't figure out how to enable it?

the sonarlint analyze option is greyed out for the file now. I tried looking for excluded files at Preferences > SonarLink > File Exclusions, but the file wasn't in the list

enter image description here

How to remove the file from sonar lint exclusion?

Eclipse Version: Mars.2 Release (4.5.2)

SonarLint version: SonarLint for Eclipse 3.6.0.201806071228

like image 857
tweeper Avatar asked Jul 18 '18 09:07

tweeper


2 Answers

Follow the below steps,

  1. Properties of the project folder where you bound the sonar lint.
  2. SonarLint on the left navigation of the properties for the project
  3. File exclusions(it shows the file you excluded)
  4. Select the file in the file exclusions section. just Remove

enter image description here

Again, the respective file is available for sonar lint analysis

If this view is empty for you, than check the project specific settings as described by the comment of pradipgarala.

like image 166
phanindra pvs Avatar answered Sep 25 '22 17:09

phanindra pvs


Remark on where to find the excluded files in IntelliJ:

File > Settings > Other Settings > Sonar Project Settings > File Exclusions

like image 22
Kristof Vermeulen Avatar answered Sep 21 '22 17:09

Kristof Vermeulen