Suddenly exceeding the 100K LoC limit for no reason!

Hi there !

I have a weird error message only on main branch analysis (not on PRs) :

Whereas in the admin, I am clearly way far from the limit :
image

And we clearly haven’t added that many lines of code. Also, we haven’t changed any config…

  • ALM used : Azure DevOps

  • CI system used : Azure DevOps

  • Scanner command used :

    SonarCloud plugins:
    - SonarCSS 1.2.0.1325 (cssfamily)
    - SonarPLSQL 3.4.1.2576 (plsql)
    - SonarScala 1.7.0.883 (sonarscala)
    - C# Code Quality and Security 8.10.0.19839 (csharp)
    - Vulnerability Analysis 8.5.0-M1.3491 (security)
    - Java Code Quality and Security 6.6.0.22815 (java)
    - SonarHTML 3.2.0.2082 (web)
    - SonarFlex 2.5.1.1831 (flex)
    - SonarXML 2.0.1.2020 (xml)
    - VB.NET Code Quality and Security 8.10.0.19839 (vbnet)
    - SonarSwift 4.2.2.77 (swift)
    - CFamily Code Quality and Security 6.12.0.20255 (cpp)
    - Python Code Quality and Security 3.0.0.7330 (python)
    - JaCoCo 1.1.0.898 (jacoco)
    - Mercurial 1.1.2 (scmmercurial)
    - SonarGo 1.7.0.883 (go)
    - SonarKotlin 1.7.0.883 (kotlin)
    - SonarTSQL 1.4.0.3334 (tsql)
    - SonarApex 1.7.0.883 (sonarapex)
    - JavaScript/TypeScript Code Quality and Security 6.3.0.12464 (javascript)
    - SonarRuby 1.7.0.883 (ruby)
    - Vulnerability Rules for C# 8.5.0-M1.3491 (securitycsharpfrontend)
    - Vulnerability Rules for Java 8.5.0-M1.3491 (securityjavafrontend)
    - License for SonarLint 8.0.0.10703 (license)
    - COBOL Code Quality 4.5.1.4460 (cobol)
    - Vulnerability Rules for Python 8.5.0-M1.3491 (securitypythonfrontend)
    - Git 1.12.0.2034 (scmgit)
    - PHP Code Quality and Security 3.8.0.6152 (php)
    - SonarABAP 3.8.0.2034 (abap)
    - Vulnerability Rules for PHP 8.5.0-M1.3491 (securityphpfrontend)
    Global server settings:
    - email.from=noreply@sonarcloud.io
    - email.fromName=SonarCloud
    - email.prefix=[SonarCloud]
    - sonar.auth.bitbucket.enabled=true
    - sonar.auth.microsoft.enabled=true
    - sonar.core.id=1BD809FA-AWHW8ct9-T_TB3XqouNu
    - sonar.core.serverBaseURL=https://sonarcloud.io
    - sonar.core.startTime=2020-08-11T09:10:13+0200
    - sonar.dbcleaner.weeksBeforeDeletingAllSnapshots=480
    - sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByMonth=4
    - sonar.dbcleaner.weeksBeforeKeepingOnlyOneSnapshotByWeek=1
    - sonar.feature_flag.bbc_code_reports.enabled=true
    - sonar.leak.period=30
    - sonar.lf.enableGravatar=true
    - sonar.lf.logoWidthPx=105
    - sonar.organizations.anyoneCanCreate=true
    - sonar.organizations.createPersonalOrg=true
    - sonar.plsql.file.suffixes=sql,tab,pkb
    - sonar.tsql.file.suffixes=.tsql
    Project server settings:
    - sonar.pullrequest.provider=Azure DevOps Services
    - sonar.pullrequest.vsts.token.secured=******
    Project scanner properties:
    - sonar.exclusions=/Test.php
    - sonar.host.url=https://sonarcloud.io/
    - sonar.login=
    ***
    - sonar.organization=assoconnect
    - sonar.php.coverage.reportPaths=clover.xml,clover-new.xml,clover-e2e.xml
    - sonar.php.tests.reportPath=junit.xml,junit-new.xml,junit-e2e.xml
    - sonar.projectBaseDir=/home/vsts/work/1/s
    - sonar.projectKey=assoconnect_backend
    - sonar.projectName=backend
    - sonar.projectVersion=20200811.26
    - sonar.scanner.app=ScannerCLI
    - sonar.scanner.appVersion=4.4.0.2170
    - sonar.scanner.metadataFilePath=/home/vsts/work/_temp/sonar/20200811.26/4a0fd8db-de1e-ad93-40b4-9c642bad31ee/report-task.txt
    - sonar.sourceEncoding=UTF-8
    - sonar.sources=src
    - sonar.test.inclusions=**/*Test.php
    - sonar.tests=tests
    - sonar.verbose=true

  • Languages of the repository : PHP

  • Error observed :

Since two days, I have the following problem :

  • analysis on PRs works fine
  • analysis on master branch fails with the message :

“This analysis will make your organization ‘assoconnect’ to reach the maximum allowed lines limit (having 105484 lines).
Please contact the administrator of the organization to resolve this issue.”

And we clearly haven’t added that many lines of code. Also, we haven’t changed any config…

This is a pivate repo, I think I will need help from the Sonar team…

Thanks !

1 Like

Hi @Clement_Fleury_AssoC and welcome to the community,

Thanks for reaching us.
We are looking into it and will get back to you.

2 Likes

Hi!
There’s indeed a problem in the way the number of lines of code is computed for PHP.
We recently deployed a new version of the PHP analyzer which provides new rules on test files and we now wrongly count the lines of code of test files.
We are going to fix that very soon.
Sorry for the inconvenience.

2 Likes

Hi @Clement_Fleury_AssoC,

The issue should be fixed. Could you please retry and come back to us?

Thanks!

1 Like

Thanks guys !

Excellent, things are back to normal !

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.