Sonar.exclusions not working

Hello,

I’m using this properties file:

# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources=.
 
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

# Only check these paths
sonar.inclusions=aaa/**/*

sonar.exclusions=aaa/js/jquery.jeditable.js

but result is:

INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings

My scanner client version is “INFO: SonarScanner 4.5.0.2216”

Could you help me?

Thank you so much.

Hi Iban,

Can you please share:

  • Your project directory structure
  • The analysis full context: under Project Settings -> Background Tasks then select ’ Show Scanner Context ’ on the analysis task.
  • The full analysis log in debug mode (passing the -X flag)

With that info it may be possible to realise what is going on.

Cheers,
Daniel

Hello,

First, thank you so much for your response.

My answers:

Your project directory structure

Look attached image

The analysis full context: under Project Settings -> Background Tasks then select ’ Show Scanner Context ’ on the analysis task.

Sorry. I can’t. I don’tt have access to the server configuration.

The full analysis log in debug mode (passing the -X flag)

Look attached file result.txt (12.5 KB)

Regards,
Iban.

Iban,

I see you are obfuscating the paths on the logs. I cannot help you clarifying whether your ignore rule makes sense or not if I am not able to see the exact project directory structure upon analysis.

I would encourage you to check whether your ignore rule matches any folder within the project structure according to its structure upon analysis on the disk.

Cheers,
Daniel

Hi Daniel,

My structure is very simple:

/btx/js/jquery.jeditable.js
/btx/js/otherfiles.js

Rules:
sonar.inclusions=btx//*
sonar.exclusions=
/jquery.jeditable.js

Why is no excluding “jquery.jeditable.js” ? I also tried sonar.exclusions=btx/js/jquery.jeditable.js

Thank you.