Updated on 2026-08-10 GMT+08:00

Compilation Error Due to File Format

Symptom

The log contains Error during SonarScanner execution, and logs in a similar format are displayed.

Cause Analysis

The code file is not standard, causing a parsing failure.

Solution

  • Solution 1: Modify the code.
    • Modify the code of the file indicated in the log. You can search for Caused by in the logs to view the specific code issue.

    • If the error file cannot be found by searching for Caused by, search for sonarqube error logs begin instead.

  • Solution 2: Ignore the error file.
    • Method 1: Create a file named sonar-project.properties in the root directory of the code, and configure the sonar.exclusions attribute to ignore the file, as shown in the following figure.

      Use commas (,) to separate multiple files.

    • Method 2: For versions later than November 30, 2023, select the file sets to be ignored by referring to Configuring Check Scope.