Skip to content

Conversation

@Claudenw
Copy link
Contributor

@Claudenw Claudenw commented Nov 8, 2025

Fixes for core tests to adapt to removed options, methods and classes.

This fixes the issues with the core build and test on the FEAT_Remove_deprecations branch.

this PR will not build. It is intended only to fix the core module.
The build should successfully build core and fail on tools.

@Claudenw Claudenw force-pushed the FEAT_Remove_deprecations branch from e1e1aad to 051894e Compare November 8, 2025 14:46
@Claudenw Claudenw force-pushed the FEAT_Remove_deprecations_fix_core_tests branch from e429be2 to bf5a190 Compare November 8, 2025 14:52
@ottlinger ottlinger changed the title fix core tests RAT-465: fix core tests Nov 8, 2025
@Claudenw Claudenw changed the title RAT-465: fix core tests RAT-465: fix core tests after removal of deprecated objects Nov 10, 2025
@Claudenw Claudenw requested a review from ottlinger November 10, 2025 23:41
@Claudenw Claudenw marked this pull request as ready for review November 10, 2025 23:41
*/
public static ReportConfiguration parseCommands(final File workingDirectory, final String[] args,
final Consumer<Options> helpCmd, final boolean noArgs) throws IOException {
final Consumer<Options> helpCmd, final boolean noArgs) throws IOException, ParseException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ParseException seems to be missing in Javadoc.

configuration.getClaimValidator().listIssues(reporter.getClaimsStatistic()))));
}
}
} catch (ParseException e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we log something before exiting with status 1?

generateConfig(ImmutablePair.of(option, args));
assertThat(DefaultLog.getInstance().getLevel()).isEqualTo(level);
} catch (IOException e) {
} catch (IOException | ParseException e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we let ParseException extend IOException in order to simplify the code here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't own ParseExcepton. It is from commons cli.

System.setOut(origin);
}
}
// @OptionCollectionTest.TestFunction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a TODO here in order to make it easier to find the spot that needs more work ;) Thx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is removed as it was a duplicate.

fail(e.getMessage(), e);
}
}
// @OptionCollectionTest.TestFunction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a TODO here in order to make it easier to find the spot that needs more work ;) Thx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed as it was duplicated code.

@ottlinger
Copy link
Contributor

ottlinger commented Nov 11, 2025

@Claudenw thanks for all your work - little review comments attached. Let's see how things evolve while fixing the other modules! At least it simplifies many things and makes RAT cleaner. Thx

@Claudenw Claudenw requested a review from ottlinger November 11, 2025 22:53
@Claudenw
Copy link
Contributor Author

@ottlinger If you are happy with the changes please merge and I will get the maven one queued up for review.

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.

2 participants