[sonar:sonar] Unable to parse source file :

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 7.9.1

  • error observed (wrap logs/code around triple quote ``` for proper formatting)
    "’ [sonar:sonar] Unable to parse source file : ‘hybris/**/HttpLogger.java’
    [sonar:sonar] Parse error at line 98 column 67: Lambda expressions are allowed only at source level 1.8 or above "’

  • steps to reproduce

This is happening in AWS instances where we have SonarQube. Though coverage is there for this class but due to this error, the no of lines and coverage is not getting displayed in the dashboard.

For scanner, we use <sonar:sonar /> tag

We use ant target in processing build and execute the test cases and sonar targets. Not using maven build.

  • potential workaround
    No workaround so far

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

Hey there.

Sounds like you need to pass in the right Java Source Version.

Thank you @Colin . I have corrected and working fine.

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