Comments (4)
Extra note: this error doesn't seem to fail the actual
scalafmt
CLI and returns with exit code 0, which makes it very easy to miss it on the CI. runningscalafmt --checklogs all the errors and then doesn't fail the CI job.
I couldn't reproduces this part. After running this, I do echo $?
and get 8.
But if you add runner.ignoreWarnings = true
, then you get 0.
from scalafmt.
Managed to minimize the configuration replicating this problem to the following:
version = "3.8.1"
runner.dialect = scala3
rewrite.rules = [
RedundantBraces
]
Removing the RedundantBraces
rewrite rule makes the error go away.
from scalafmt.
Further minimization:
.scalafmt.conf
:
version = "3.8.1"
runner.dialect = scala3
rewrite.rules = [
RedundantBraces
]
Scala code:
//> using scala 3
//> using dep org.scala-lang.modules::scala-xml:2.2.0
val id = "com.example.MyTest"
<testcase id={id}/>
The RedundantBraces
rewrite rule seems to be what breaks.
from scalafmt.
Extra note: this error doesn't seem to fail the actual scalafmt
CLI and returns with exit code 0, which makes it very easy to miss it on the CI.
running
scalafmt --check
logs all the errors and then doesn't fail the CI job.
from scalafmt.
Related Issues (20)
- 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
- apply more stringent scalafmt formatting
- With `newlines.source = keep` linebreaks are not preserved in lists with non-numeric entries HOT 2
- With `newlines.source = keep` linebreaks are not preserved in function parameter lists HOT 3
- Preserve newlines more strictly HOT 12
- RedundantParens removes too much parens HOT 2
- `PositionExceptionImpl` complaining about expected `)` when encountering valid `<-` in for comprehension HOT 2
- Annotation argument is not a constant
- Feature request: code style for `match` dot-notation HOT 5
- Error with `RedundantBraces` and XML attribute in v3.8.1 HOT 1
- `if` + `then` rejected with significant indentation off HOT 12
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.