How to include files at project root level?

In our projects, this structure is quite common:

- (project root)
  - /src/
  - /tests/
  index.js
  webpack.config.js

So with sonar.sources=src and sonar.tests=tests, how can I also include any .js files at the project root level in the source analysis (i.e., ./index.js and ./webpack.config.js)?

Hi James!

sonar.sources supports a list of path, so you can specify multiple path separated by commas if you want.

You can also set it to the root folder like this: sonar.sources=. and then exclude what you don’t want in your sources, for exemple sonar.exclusions=tests/**