Skip to content

Conversation

@zosrothko
Copy link

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.

@slachiewicz slachiewicz requested a review from Copilot October 19, 2025 10:52
Copy link

Copilot AI left a 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() to getRawCommandline() 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;
Copy link

Copilot AI Oct 19, 2025

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'.

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +36
this.defautlObjectFiles = new ArrayList<>();
this.defautlObjectFiles.add( objectFile0 );
this.defautlObjectFiles.add( objectFile1 );
Copy link

Copilot AI Oct 19, 2025

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'.

Copilot uses AI. Check for mistakes.
private Commandline getCommandline()
throws NativeBuildException
{
return this.linker.createLinkerCommandLine( defautlObjectFiles, config );
Copy link

Copilot AI Oct 19, 2025

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'.

Copilot uses AI. Check for mistakes.
super( parser );
this.bracket = bracket;
this.quote = quote;
}
Copy link

Copilot AI Oct 19, 2025

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.

Suggested change
}
}

Copilot uses AI. Check for mistakes.
}

/**
* Setup Commandline to handle external library depending on extention type
Copy link

Copilot AI Oct 19, 2025

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'.

Suggested change
* Setup Commandline to handle external library depending on extention type
* Setup Commandline to handle external library depending on extension type

Copilot uses AI. Check for mistakes.
Commandline cl = compiler.getCommandLine( sourceFile, objectFile, config );
assertArrayEquals( new String[] { "gcc", simpleArgv[0], simpleArgv[1], simpleArgv[2], simpleArgv[3] },
cl.getCommandline() );
cl.getRawCommandline() );
Copy link

Copilot AI Oct 19, 2025

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.

Suggested change
cl.getRawCommandline() );
cl.getRawCommandline() );

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant