Getting sonar checks failed while raised a pr

Template for a good new topic, formatted with Markdown:

  • ALM used - GitHub
  • CI system used Azure DevOps.
  • Scanner command used when applicable (private details masked)
  • Languages of the repository - React js.
  • Error observed “ERROR: Error during SonarScanner execution
    ERROR: Could not find a default branch to fall back on.
    ERROR:
    ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.”

while i raised a pr to my github branch the checks have been failed everyt ime at sonarcloud scanning and showing the above issue in the logs.

Hi,

Could we have the full analysis log, please?

 
Thx,
Ann

HI Ann ,


please look into the screenshot provided of the analysis.

Previously when i raised the Pr the all checks were succesed .After I created a .env file and raised a pr with it from then i am getting the checks failed .Even after i mage the env file to .gitnore still getting the checks failed and got the above error on logs.

Hi,

Please copy/paste the full text of that log.

 
Thx,
Ann