-
Consider the following code snippet:
It does fulfill all formatting rules, including the alignment on the However,
losing the valuable "extra" formatting.
(a) Is there any Using format (b) A
** Should (c) If "no", would it make sense ? For some configurations like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@ftucky there's an implied additional "rule" (or property of scalafmt design), that for everything else there's a predefined fallback (no space is some cases, one space in others). scalafmt is not a linter which checks compliance with some rules, it's a tool which will produce its own formatting of code subject to a few configurable partial constraints. if scalafmt is asked to verify formatting, it checks whether the code was previously formatted by scalafmt using the same configuration, and not whether it complies with a subset of intentions expressed via a few explicit parameters in that configuration. it's impossible to do that you described. |
Beta Was this translation helpful? Give feedback.
@ftucky there's an implied additional "rule" (or property of scalafmt design), that for everything else there's a predefined fallback (no space is some cases, one space in others).
scalafmt is not a linter which checks compliance with some rules, it's a tool which will produce its own formatting of code subject to a few configurable partial constraints.
if scalafmt is asked to verify formatting, it checks whether the code was previously formatted by scalafmt using the same configuration, and not whether it complies with a subset of intentions expressed via a few explicit parameters in that configuration.
it's impossible to do that you described.