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

New UI option to configure problem severity for unused lambda parameters #1721

Open
noopur2507 opened this issue Oct 17, 2024 · 3 comments
Open
Assignees
Milestone

Comments

@noopur2507
Copy link
Member

See #1701 (comment).

Please note: eclipse-jdt/eclipse.jdt.core#3055 also introduces an API option to control whether unused lambda parameters should be complained against.

The option string is declared as:

public static final String OPTION_ReportUnusedLambdaParameter = "org.eclipse.jdt.core.compiler.problem.unusedLambdaParameter";

Note: This option has an effect only on JDK22 and upwards. For 21 and below, the compiler does not emit the unused lambda parameter warning - since these are not actionable.

@nlisker
Copy link

nlisker commented Oct 17, 2024

Lambdas are not the only places where unnamed patterns can occur: eclipse-jdt/eclipse.jdt.core#3054 (comment)
Are the other cases covered separately?

@noopur2507
Copy link
Member Author

Opened eclipse-jdt/eclipse.jdt.core#3102 for the required API.

@noopur2507
Copy link
Member Author

Lambdas are not the only places where unnamed patterns can occur: eclipse-jdt/eclipse.jdt.core#3054 (comment) Are the other cases covered separately?

This issue is only for the new UI option to configure the severity of compiler problem for unused lambda parameters i.e. under Preferences > Compiler > Errors/Warnings > Unnecessary code.

If other compiler problems need a UI option to configure the severity, please open separate issues for each.

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