Comments (6)
(I had some other options, but they don't seem to be relevant, and didn't change the behavior anyway).
and you re-tested without them? I tried your configuration and code example, and I can't reproduce, unfortunately; my test works exactly as you expected.
Coursier seems to want to install the entire ...
I cannot comment on that but I haven't seen it take more than a minute on a decent connection.
... so can't try it with the CLI, sorry.
In that case, you should submit your issue to the repository which contains your integration. This repository is not for SBT-related submissions.
I am using 3.7.15 with SBT plugin:
sbt scalafmt
But just in case: I don't think sbt scalafmt
is actually a valid command.
Workaround
Not use scalafmt?
Не может так оказаться, что это уже произошло? Один деятель неделю назад обнаружил, что трудолюбивый vscode паралельно что-то портил.
from scalafmt.
@kitbellew I dunno ... must be one of those "works on my machine" cases I guess 😄
Here is the complete case I am reproducing reliably (yes, with CLI ... coursier finally finished!)
[test-branch] [1123]> cat .scalafmt.conf
version = "3.7.16"
runner.dialect = scala213
newlines.source=keep
maxColumn = 40
[test-branch] [1124]> scalafmt --version
scalafmt 3.7.16
[test-branch] [1125]> scalafmt --test foobar.scala
--- a/Users/dtkach/workspace/cdp-core/foobar.scala
+++ b/Users/dtkach/workspace/cdp-core/foobar.scala
@@ -1,9 +1,4 @@
class Foo {
- type It = Foo with
- Bar with
- Baz with
- Bat with
- Bak with
- Bam with
- Ban
+ type It = Foo with Bar with Baz
+ with Bat with Bak with Bam with Ban
}
error: --test failed
from scalafmt.
"not planned" ... Love it 🤣
from scalafmt.
i closed it as "can't reproduce", which you agreed with.
from scalafmt.
I did? Hm ... I guess, "Here is the complete case I am reproducing reliably" can be construed to mean "I agree it is not reproducible" in some of the infinite number of the Universes ... :D
from scalafmt.
@kitbellew I dunno ... must be one of those "works on my machine" cases I guess 😄
what would you like me to do, @dimatkach? i ran exactly what you suggested, and it works as expected. i suggested that there was a similar case recently when a running IDE process was messing with the results of formatting. what else?
from scalafmt.
Related Issues (20)
- Scalafmt breaks code (tuple, trailing comma, RedundantParens)
- Does scalafmt support automatic removal of unused imports HOT 2
- Too many line breaks when using :: HOT 1
- Inconsistent `extends` alignment with `align.preset = more` HOT 8
- Produces Non-Compiling Code with implicit keyword after colon HOT 2
- How can I make "then" at the end of line, not next line HOT 1
- 3.8.0 breaks lambda functions
- scalafmt fail at parsing \n??? HOT 1
- scalafmt rewrites scala 2 syntax into scala 3 in build.sbt file
- SortModifiers does not follow Scala style guide HOT 3
- 3.8.0 breaks code when the next line starts with a parenthesis HOT 2
- 3.8.0 regression: tuple expression at the start of a line are moved to prior line (inside of match cases) HOT 2
- Scalafmt 3.8.0 update: suspicous reformatting HOT 3
- More newlines in unit tests after updating to 3.8.0 HOT 6
- Exception in scalafmt HOT 1
- Code no longer compiles after formatting HOT 1
- Implement fewer-braces rewrite
- Scalafmt in scala 3 dialect adds a new line after a `'` expression which changes behaviour of program HOT 6
- Properly formatted code using zio method `*>` is formatted so the code is no longer valid
- Wrong formatting of code blocks with partial functions returning tuples HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scalafmt.