You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On my code base, running Error Prone with -Xep:StatementSwitchToExpressionSwitch:WARN -XepOpt:StatementSwitchToExpressionSwitch:EnableDirectConversion=true produces findings.
However, if I want to enable patching and pass -Xep:StatementSwitchToExpressionSwitch:WARN -XepOpt:StatementSwitchToExpressionSwitch:EnableDirectConversion=true -XepPatchChecks:StatementSwitchToExpressionSwitch -XepPatchLocation:..., no findings are shown and no error-prone.patch is generated anymore since 2.26.0.
If I go back to Error Prone 2.25.0, producing patches for StatementSwitchToExpressionSwitch works as expected with these command-line parameters. Version 2.26.0 and 2.27.1 both disable StatementSwitchToExpressionSwitch if I ask for patches from it.
I suspect that this is due to #4028 and that other experimental (disabled by default) checks suffer from the same problem, but I did not test this.
IMHO Error Prone could just enable an experimental check if it is used with -XepPatchChecks, even if it is not enabled explicitly, but I am also fine with having to pass both -Xep:StatementSwitchToExpressionSwitch:WARN and -XepPatchChecks:StatementSwitchToExpressionSwitch.
The text was updated successfully, but these errors were encountered:
I still cannot get patching to work for StatementSwitchToExpressionSwitch on Error Prone 2.29.1. As soon as I pass -XepPatchChecks:StatementSwitchToExpressionSwitch -XepPatchLocation:..., the check does not produce any findings anymore, but it does if I do not ask for patches.
On my code base, running Error Prone with
-Xep:StatementSwitchToExpressionSwitch:WARN -XepOpt:StatementSwitchToExpressionSwitch:EnableDirectConversion=true
produces findings.However, if I want to enable patching and pass
-Xep:StatementSwitchToExpressionSwitch:WARN -XepOpt:StatementSwitchToExpressionSwitch:EnableDirectConversion=true -XepPatchChecks:StatementSwitchToExpressionSwitch -XepPatchLocation:...
, no findings are shown and noerror-prone.patch
is generated anymore since 2.26.0.If I go back to Error Prone 2.25.0, producing patches for
StatementSwitchToExpressionSwitch
works as expected with these command-line parameters. Version 2.26.0 and 2.27.1 both disableStatementSwitchToExpressionSwitch
if I ask for patches from it.I suspect that this is due to #4028 and that other experimental (disabled by default) checks suffer from the same problem, but I did not test this.
IMHO Error Prone could just enable an experimental check if it is used with
-XepPatchChecks
, even if it is not enabled explicitly, but I am also fine with having to pass both-Xep:StatementSwitchToExpressionSwitch:WARN
and-XepPatchChecks:StatementSwitchToExpressionSwitch
.The text was updated successfully, but these errors were encountered: