Cobol Check ExtensionCobol Check provides fine-grained unit testing/checking for Cobol at the same conceptual level of detail as unit testing frameworks for other languages, such as Python, Ruby, C#, and Java. This package delivers the functionality of Cobol Check along with the Cobol unit test language(CUT). This is the language used to write unit tests for Cobol Check. Currently the extension has the following features:
RequirementsCobol Check requires a global installation of GnuCOBOL. In order to locate unit tests, Cobol Check looks for a folder with an identical name to that of the COBOL source program. Ex.: A program called 'COBTEST.cbl' exists in the source folder. For a test to reference that program it needs to be inside a folder called 'COBTEST'. Inside the folder COBTEST can be multiple .cut files. As these files are inside the folder, they all reference COBTEST.cbl. The cobol-unit-test-syntax package references the COBOL grammar, defined in IBM Z Open Editor, for inline COBOL. Additionally, tab behavior is handled by referencing the custom tab function defined in aforementioned extension. Extension SettingsThis extension contributes the following settings:
ContributingIf you are interested in contributing to Cobol Check or this extension, start here: https://github.com/openmainframeproject/cobol-check The extension client is implemented for VScode, while the server is entirely decoupled, such that it can be 'attached' to an arbitrary client and used with any IDE. Testing: Press F5 to open a new window with the extension loaded. Set breakpoints in the code inside src/extension.ts to debug the extension. Find output from the extension in the debug console. You can relaunch the extension from the debug toolbar after changing code in client/src/extension.ts. You can also reload (Ctrl+R or Cmd+R on Mac) the VS Code window with the extension to load the changes. Automated tests: There is already a few tests for desired behavior, two of which fail due to missing implementation. The currently failing tests correspond to the missing features described in CONTRIBUTING.md. Logging: There is a dedicated logger for both client and server that gets its level of detail from settings. The logger in client can be used at arbitrary positions, while the server logger must be used in the context of an open textdocument. For additional logging needs, server side, use connection.console.log(). |