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
using the experimental command line interface of autorefactor I am trying refactorings on
some bigger source sets.
I understand that autorefactor is an opinionated sets of rules and I am agreeing with most of those opinions. But in case of JUnitAssertRefactoring I disagree with (some of) the refactorings of "fail".
"result" and or "response" may be big strings or objects having an expensive toString or producing big strings.
So this code is written this way to avoid those costs.
Something along the logging idiom
if (log.isDebugEnabled()) {
log.debug(<expensive-to-string>);
}
Would you consider some kind of configuration in cases like this?
If you can tell me an example of how to configure a refactoring I may be able to develop something for this case.
The text was updated successfully, but these errors were encountered:
You're right. Currently, you can disable one refactoring going to Window -> Preferences -> Java -> Code style -> AutoRefactor -> Rules by default. In the future, we should split the JUnit rule to allow to enable/disable only this part of the rule. We planned to do such split for the next version (not the next release) but we don't know when we will release.
Do you have any prototype work or ideas how to do it?
I think about giving names to the different parts and being able to enable or disable parts or configure them.
Something like
--param JUnitAssertRefactoring.ifToFail=false
and the rule providing Parameter objects including descriptions.
Something that allows ui usage and command line usage.
Hi @JnRouvignac @Fabrice-TIERCELIN,
using the experimental command line interface of autorefactor I am trying refactorings on
some bigger source sets.
I understand that autorefactor is an opinionated sets of rules and I am agreeing with most of those opinions. But in case of JUnitAssertRefactoring I disagree with (some of) the refactorings of "fail".
For example look at the following diff:
"result" and or "response" may be big strings or objects having an expensive toString or producing big strings.
So this code is written this way to avoid those costs.
Something along the logging idiom
Would you consider some kind of configuration in cases like this?
If you can tell me an example of how to configure a refactoring I may be able to develop something for this case.
The text was updated successfully, but these errors were encountered: