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
There are some suggestions that are currently limited by some arbitrary number to prevent too short or too long things from being suggested.
For example one might introduce an "unnecessary" variable for a very long line like this:
varx = /* very large maybe even multiline expression */;
System.out.println(x);
Here it wouldn't be sensible to suggest the variable as unnecessary, because it does serve a purpose.
There are other lints who would benefit from this too. The LOOP_COULD_BE_FOR is another one, it doesn't make sense to have a for loop that must be split into multiple lines to fit into some line limit:
for (/* ... */;
/* ... */;
/* ... */) {
// ...
}
For that a utility method would be nice to have. Depending on the nesting, the line limit will be different, so it makes sense to have a helper method doing this correctly.
The text was updated successfully, but these errors were encountered:
Description
There are some suggestions that are currently limited by some arbitrary number to prevent too short or too long things from being suggested.
For example one might introduce an "unnecessary" variable for a very long line like this:
Here it wouldn't be sensible to suggest the variable as unnecessary, because it does serve a purpose.
There are other lints who would benefit from this too. The
LOOP_COULD_BE_FOR
is another one, it doesn't make sense to have a for loop that must be split into multiple lines to fit into some line limit:For that a utility method would be nice to have. Depending on the nesting, the line limit will be different, so it makes sense to have a helper method doing this correctly.
The text was updated successfully, but these errors were encountered: