Students are able to compile code that is longer than 80 columns with fixed-form
Opened this issue · 5 comments
KTSnowy commented
I thought that gnuCOBOL's default option maintained the fixed-form column length limit.
KTSnowy commented
@0xE282B0 do you know if cobol-check has any options to maintain the column limit?
0xE282B0 commented
We found out that the line limits are not hit because cobolcheck reformats the code.
Before cobolcheck:
IF FUNCTION MOD ( WS-YEAR, 4 ) = 0 AND FUNCTION MOD ( WS-YEAR, 100 ) > 0 OR FUNCTION MOD ( WS-YEAR, 400 ) = 0
MOVE 1 TO WS-RESULT
ELSE
MOVE 0 TO WS-RESULT.
After cobolcheck:
IF FUNCTION MOD ( WS-YEAR, 4 ) = 0 AND FUNCTION MOD (
WS-YEAR, 100 ) > 0 OR FUNCTION MOD ( WS-YEAR, 400 ) = 0
MOVE 1 TO WS-RESULT
ELSE
MOVE 0 TO WS-RESULT.
0xE282B0 commented
@KTSnowy This behavior is not configurable, see: https://github.com/openmainframeproject/cobol-check/blob/main/src/main/java/org/openmainframeproject/cobolcheck/features/writer/CobolWriter.java#L36-L47
But that would be easy to change.
KTSnowy commented
But that would be easy to change.
Would it be alright if you make a temporary fork to test it?
If it works we can keep using the fork for our track.
0xE282B0 commented
Sure, just need to see when I can get to that.