-
Notifications
You must be signed in to change notification settings - Fork 14
Add Cobol compiling feature thru the GNU Cobol compiler #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
the inserted prefix on Windows.
…Line() Signed-off-by: Francis ANDRE <[email protected]>
Signed-off-by: Francis ANDRE <[email protected]>
Signed-off-by: Francis ANDRE <[email protected]>
Signed-off-by: Francis ANDRE <[email protected]>
Signed-off-by: Francis ANDRE <[email protected]>
Signed-off-by: Francis ANDRE <[email protected]>
<doclint>none</doclint> to avoid strict control over Javadoc warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds COBOL compilation support to the maven-native project through the GNU COBOL compiler (cobc). The addition includes both compiler and linker implementations along with comprehensive test coverage and Maven configuration updates.
Key changes include:
- New GNU COBOL compiler and linker components with full configuration support
- COBOL parser implementation for dependency analysis
- Updated Maven configurations including dependency management and Javadoc settings
- Test migration from deprecated
getCommandline()togetRawCommandline()method
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Added GNU COBOL dependency, updated plexus-utils version, and configured Javadoc settings |
| maven-native-components/pom.xml | Added GNU COBOL module to build |
| maven-native-components/maven-native-gnucobol/* | New GNU COBOL compiler/linker implementation with comprehensive tests |
| maven-native-api/src/main/java/org/codehaus/mojo/natives/parser/* | Added COBOL parser support |
| Various test files | Updated to use getRawCommandline() instead of deprecated getCommandline() |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| private static final File objectFile1 = new File( "source2.o" ); | ||
|
|
||
| private List<File> defautlObjectFiles; |
Copilot
AI
Oct 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'defautl' to 'default'.
| this.defautlObjectFiles = new ArrayList<>(); | ||
| this.defautlObjectFiles.add( objectFile0 ); | ||
| this.defautlObjectFiles.add( objectFile1 ); |
Copilot
AI
Oct 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name contains typo - 'defautl' should be 'default'.
| private Commandline getCommandline() | ||
| throws NativeBuildException | ||
| { | ||
| return this.linker.createLinkerCommandLine( defautlObjectFiles, config ); |
Copilot
AI
Oct 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name contains typo - 'defautl' should be 'default'.
| super( parser ); | ||
| this.bracket = bracket; | ||
| this.quote = quote; | ||
| } |
Copilot
AI
Oct 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation - line uses tabs instead of spaces, which doesn't match the surrounding code style.
| } | |
| } |
| } | ||
|
|
||
| /** | ||
| * Setup Commandline to handle external library depending on extention type |
Copilot
AI
Oct 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'extention' to 'extension'.
| * Setup Commandline to handle external library depending on extention type | |
| * Setup Commandline to handle external library depending on extension type |
| Commandline cl = compiler.getCommandLine( sourceFile, objectFile, config ); | ||
| assertArrayEquals( new String[] { "gcc", simpleArgv[0], simpleArgv[1], simpleArgv[2], simpleArgv[3] }, | ||
| cl.getCommandline() ); | ||
| cl.getRawCommandline() ); |
Copilot
AI
Oct 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation - line uses tabs instead of spaces, which doesn't match the surrounding code style.
| cl.getRawCommandline() ); | |
| cl.getRawCommandline() ); |
Hello
This PR will add to the maven-native a new feature of compiling COBOL program using the GNU Cobol compiler.
Hope you would find this new feature useful.