How to select one folder and one file to scan using Sonar scanner

Hello. I have read the documentation about Inclusions and I have al read:

but still not able to grasp how to configure the .properties file for my project.

My project structure is as shown below:

Currently, my sonar-project.properties:

sonar.projectKey=xxxxx
sonar.qualitygate.wait=true
sonar.sources = modules/

Currently, it only scan all files in my modules directory. Additionally, I want to scan mainwindow.py

So I want to scan :

  1. mainwindow.py
  2. all files in modules directory

How can I modify my .properties to achieve this?

There are multiple ways (see the docs on analysis scope, but super simply, sonar.sources accepts comma separated values of either individual files, or directories.

So:

sonar.sources = mainwindow.py,modules