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
This is a duplicate of #365 and #533. As noted in these issues, we are working on detecting alignment to fix the most common case where styler falls short of the expectations. It's already done for function calls in the devel version of styler, the heuristic are outlined in the corresponding vignette.
We are coming close to a point where calling styler can happen by default as a precommit across all of our packages. But, we are facing some problems with some jobs that parse R files, as they weren't written with styler's formatting conventions in mind.
Being able to turn styler off for these edge cases, and even better for just part of the code, would be really helpful.
As pointed out, I don’t see a lot of value in that. I‘d prefer to focus on concrete cases and try to improve formatting there. If you have any, please open a new issue. The formatter should be so good that there is no need for exceptions. Also, implementing this feature is non-trivial and likely to slow down styler and make it more complex - for limited gain. Instead of marking many lines with nostyler, why not making them compliant?
I might think about how to implement this a bit - if you have concrete suggestions, please let me know.
Activity
lorenzwalthert commentedon Sep 10, 2019
This is a duplicate of #365 and #533. As noted in these issues, we are working on detecting alignment to fix the most common case where styler falls short of the expectations. It's already done for function calls in the devel version of styler, the heuristic are outlined in the corresponding vignette.
michaelquinn32 commentedon Oct 8, 2019
This should be reopened.
We are coming close to a point where calling styler can happen by default as a precommit across all of our packages. But, we are facing some problems with some jobs that parse R files, as they weren't written with styler's formatting conventions in mind.
Being able to turn styler off for these edge cases, and even better for just part of the code, would be really helpful.
lorenzwalthert commentedon Oct 8, 2019
As pointed out, I don’t see a lot of value in that. I‘d prefer to focus on concrete cases and try to improve formatting there. If you have any, please open a new issue. The formatter should be so good that there is no need for exceptions. Also, implementing this feature is non-trivial and likely to slow down styler and make it more complex - for limited gain. Instead of marking many lines with
nostyler, why not making them compliant?I might think about how to implement this a bit - if you have concrete suggestions, please let me know.
lorenzwalthert commentedon Oct 8, 2019
No let's open the original issue.
lorenzwalthert commentedon Oct 22, 2019
We have a draft :-). Feedback welcome, please in the PR (#560), not here in the issue.
lorenzwalthert commentedon Nov 30, 2019
Closed with #560.