Skip to content
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

Issue #523: Add extraMvnOptions support to diff.groovy #538

Merged
merged 1 commit into from
Jan 16, 2021

Conversation

nrmancuso
Copy link
Member

Issue #523: Add extraMvnOptions support to diff.groovy

I am going to open a PR in Checkstyle for checkstyle/checkstyle#8960 in order to show that the arguements are passed to maven correctly.

@nrmancuso
Copy link
Member Author

@rnveach from #531:

¿Maybe look into creating groovy tests?

Should we do that in this PR, or...

@nrmancuso
Copy link
Member Author

AppVeyor failure:
image

I think we need to build the string to execute launch.groovy with, as we do in launch so that empty extraMvnOptions arguments don't get passed. I will update this in a bit.

@nrmancuso
Copy link
Member Author

From checkstyle/checkstyle#9186 at https://checkstyle.semaphoreci.com/jobs/cdce7615-278e-4e64-8d91-68b6b3cef46b:

image

This shows that the --offline parameter is successfully being passed to diff.goovy -> maven via extraMvnOptions.

@rnveach
Copy link
Member

rnveach commented Jan 15, 2021

Should we do that in this PR, or...

If we are converting this script to a Java project, then no.

Copy link
Member

@rnveach rnveach left a comment

Choose a reason for hiding this comment

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

1 minor issue.

checkstyle-tester/diff.groovy Outdated Show resolved Hide resolved
--config $cfg.checkstyleCfg --ignoreExceptions --ignoreExcludes
--checkstyleVersion $checkstyleVersion"""

if (cfg.extraMvnRegressionOptions == true) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Strangely, this is required, since if (cfg.extraMvnRegressionOptions) does not work as intended. I assume this is because groovy is not strongly typed.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

@nrmancuso nrmancuso Jan 15, 2021

Choose a reason for hiding this comment

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

The only difference that I can see is that we are accessing cfg's fields and opposed to actually passing arguments to generateCheckstyleReport()? Should I investigate?

Copy link
Member

Choose a reason for hiding this comment

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

Its not that big a deal.

@rnveach rnveach requested a review from romani January 15, 2021 23:42
Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

Travis is restarted, ok to merge

@romani romani merged commit de842b2 into checkstyle:master Jan 16, 2021
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.

3 participants