Properties file exclude multiple paths

18,049

You have to use the double asterisk pattern to recursively exclude all sub-folders and files:

sonar.exclusions=test/**, node_modules/**

A single asterisk matches only the files on that specific folder (no recursion).

Share:
18,049

Related videos on Youtube

Jon Duffy
Author by

Jon Duffy

Computer Science Student, Automated Tester Use PHP /CakePHP Java Interested in iOS improving test coverage

Updated on June 04, 2022

Comments

  • Jon Duffy
    Jon Duffy almost 2 years

    I have a sonar-project.properties file, which specifies how sonar-runner inspects the the folder structure, which files to inspect, which files to ignore etc.

    I cannot successfully determine however how to exclude multiple paths successfully.

    Here is the sonar-project.properties file:

    sonar.projectKey=C3S-web
    sonar.projectName=C3S-sonar-web
    sonar.projectVersion=0.0.1
    
    sonar.sources=.
    sonar.tests=test
    sonar.language=js
    sonar.profile=Sonar way
    sonar.exclusions=test/*, node_modules/*
    sonar.dynamicAnalysis=reuseReports
    
    sonar.javascript.jstest.reportsPath=coverage
    sonar.javascript.lcov.reportPath=coverage/lcov-report
    

    the line I am having trouble with is:

    sonar.exclusions
    

    listing multiple paths does not work, with or without a comma, or in quotes either.