Sonar.leak.period does not work in my sonar-scanner sonar-properties or jenkins sonar plugin

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube Community Edition V7.7
    SonarQube Scanner 3.3.0.1492 or SonarQube Scanner 3.2.0.1227

  • error observed (wrap logs/code around triple quote ``` for proper formatting)
    Modify the global configuration(in sonar web ui) is valid,but it was invalid in sonar-scanner properties;

  • steps to reproduce
    root@6712379fd985:/home/zhankb# cat sonar-project.properties
    sonar.projectKey=test_new
    sonar.projectName=test_new
    sonar.sources=.
    #sonar.leak.period=2010-12-25
    sonar.leak.period=7
    sonar.language=c
    sonar.sourceEncoding=GBK
    sonar.c.coverage.reportPath=gcovr_report.xml
    sonar.c.cppcheck.reportPath=cppcheck_result.xml
    sonar.exclusions=gcovr_report.xml,cppcheck_result.xml

  • potential workaround

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

Hi,

sonar.leak.period is not a parameter listed in the available analysis parameters, that’s the reason it’s not taken into account.
You can only set this setting in the configuration of a project (UI or WS).

Regards,
Julien Lancelot

thank you

FYI, I opened a feature request to make it an analysis parameter here. Please feel free to vote for it!