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

Config-style: control over forcing vs optimization #3961

Merged
merged 1 commit into from
May 6, 2024

Conversation

kitbellew
Copy link
Collaborator

Currently, the runner.optimizer parameters always force config-style formatting when newlines.configStyle.xxxSite.prefer is true, even though they were intended primarily to affect the route search.

On the other hand, there could be cases when a user wouldn't enable the newlines.configStyle.xxxSite.prefer flag for regular operation (for instance, it makes no sense for newlines.source=fold/unfold) but would still be interested in forcing config-style.

Therefore, let's add the sibling xxxSite.forceConfigStyleIfOptimized flag to decide when to force.

Helps with #3954.

Currently, the `runner.optimizer` parameters always force config-style
formatting when `newlines.configStyle.xxxSite.prefer` is true, even
though they were intended primarily to affect the route search.

On the other hand, there could be cases when a user wouldn't enable the
`newlines.configStyle.xxxSite.prefer` flag for regular operation (for
instance, it makes no sense for `newlines.source=fold/unfold`) but would
still be interested in forcing config-style.

Therefore, let's add the sibling `xxxSite.forceConfigStyleIfOptimized`
flag to decide when to force.
@kitbellew kitbellew merged commit 607b814 into scalameta:master May 6, 2024
9 checks passed
@kitbellew kitbellew deleted the 3961 branch May 6, 2024 10:19
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

Successfully merging this pull request may close these issues.

1 participant