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

Variable interpolation does not work for ArgGroup.heading attribute #2281

Open
marcphilipp opened this issue May 16, 2024 · 1 comment
Open

Comments

@marcphilipp
Copy link

I tried abusing an @ArgGroup heading to include a link for the previous group and wanted to use variable interpolation to generate a version-specific documentation link:

@ArgGroup(validate = false, order = 3, heading = "%n  For more information on selectors including syntax examples, see"
		+ "%n  @|underline https://junit.org/junit5/docs/${junit.docs.version}/user-guide/#running-tests-discovery-selectors|@"
		+ "%n%n@|bold FILTERS|@%n%n")
FilterOptions filterOptions;

junit.docs.version is defined as a system property. I also tried with java.version to rule out a problem setting the custom system property.

Admittedly, my use case is a bit weird (please let me know if there's a better way to do this), but the Picocli docs make it sound as if variable interpolation should work in all annotation attributes, includine ArgGroup.heading.

@remkop
Copy link
Owner

remkop commented May 16, 2024

Thank you for raising this.
That sounds like a bug.
I’ll look into it.

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

No branches or pull requests

2 participants