You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the COBOL language, ZOE offers a code formatting system based on a zcodeformat (yaml|json) file describing the options.
This feature is also available for IDz, but it is declared experimental for ZOE.
As far as we are concerned, COBOL formatting most of the time fail with an error message at the Language Server level.
However, this functionality interests us because we are in the phase of migrating COBOL programs whose code was generated by a product (IBM VisualAge Pacbase, or IBM Rational Programming Patterns) to a more "academic" COBOL code.
Note that in our context we do not want to reformat the entire source code but only certain portions of the code.
Our code is organized into different parts:
an initial skeleton code, with the possibility of refreshing
a code injected by a Coding Assistant, acting like a robot injecting snippets, but also with the possibility of refreshing this code, or removing it
code manually written by the developer
It's only this third part that we want to be able to format. The other two parts must retain their formatting to ensure the possibility of refreshing or removal:
How can we diagnose formatting tool failures and thus help stabilize it?
Thanks.
The text was updated successfully, but these errors were encountered:
FALLAI-Denis
changed the title
COBOL zcodeformat - How to help in analyze of formatting failures
COBOL formatter - How to help in analyze of formatting failures
Jul 9, 2024
@FALLAI-Denis can you check the language server logs to see if they contain related exceptions? We would like to see those to find out what causes the crash. Also any code snippets we could reproduce issues with would be helpful.
I found the problem: code controlled by a conditional compilation directive is not formatted, even if the condition is true.
I think code under conditional compilation control should always be formatted regardless of whether the condition is true or false.
Code out of control of conditional compilation: fully reformatted:
Code under control of conditional compilation: not fully reformatted, (case rules applied, but alignment rules non applied), even if condition is true
Also some "errors" in formatting...
Some of them (left before format, right after format):
level 05 and 88 and data-item in marge A
unexpected break line
unrecognized keywords
FALLAI-Denis
changed the title
COBOL formatter - How to help in analyze of formatting failures
COBOL formatter - Wrongly excluding lines under conditional compilation control
Jul 20, 2024
Hi,
For the COBOL language, ZOE offers a code formatting system based on a zcodeformat (yaml|json) file describing the options.
This feature is also available for IDz, but it is declared experimental for ZOE.
As far as we are concerned, COBOL formatting most of the time fail with an error message at the Language Server level.
However, this functionality interests us because we are in the phase of migrating COBOL programs whose code was generated by a product (IBM VisualAge Pacbase, or IBM Rational Programming Patterns) to a more "academic" COBOL code.
Note that in our context we do not want to reformat the entire source code but only certain portions of the code.
Our code is organized into different parts:
It's only this third part that we want to be able to format. The other two parts must retain their formatting to ensure the possibility of refreshing or removal:
How can we diagnose formatting tool failures and thus help stabilize it?
Thanks.
The text was updated successfully, but these errors were encountered: