- SonarQube 9.1 Enterprise
- SonarScanner 22.214.171.1242
- Receiving parse errors for COBOL file in windows-1252 charset
- Tried to set the COBOL source format to ‘variable’ through properties
- Tried reviewing documentation, github sources and examples
- Tried some “obvious” property names:
We are receiving parse errors for a set of COBOL sources in various dialects, e.g. ibm-os/vs-cobol
INFO: About to analyse COBOL Programs using 'ibm-os/vs-cobol' dialect and 'fixed' source code format. DEBUG: 'FILE.cbl' generated metadata with charset 'windows-1252' ERROR: Unable to parse COBOL source file : D:\Jenkins\workspace\FILE.cbl at line 33 Original contents starting from... 00032 DATACOM SECTION 00033 ID-AREA IS ID-AREA-IDENT Preprocessed contents: Parse error at line 33: 33: ID-AREA IS ID-AREA-IDENT ^
We are trying to determine if the parse error is due to the charset, the COBOL dialect, or because we need to define the source code format to be ‘variable’. However, I do not have access to the SonarQube instance to change the format through the GUI. I cannot find any information on how to define the format via properties, such as how sonar.cobol.dialect can be defined.
If it’s possible to set the COBOL dialect via properties, should we be able to set the source code format as well?
This documentation mentions the supported formats but gives no indication of a way to set it at runtime:
This documentation mentions a couple COBOL properties, but doesn’t even mention sonar.cobol.dialect:
And this documentation doesn’t have much information at all about all the supported runtime properties:
Any help would be appreciated. Thanks!