Comments (7)
Something seems to be very different when releasing it instead of using it from within the project.
yarn prettier --write ../jhipster-example/**/*.java 2> errors
I get two errors from the parser for code that combines strings, but everything else it runs through like crazy... Will keep this open though for the great example :)
from prettier-java.
Please check version 0.0.4, if you remove all comments from the file it should parse! I tried that. For the status on the comments see: #32
from prettier-java.
Sorry but I upgraded to 0.0.4
and removed the comments, but still got the same error:
[error] src/main/java/io/jhipster/demo/aop/logging/LoggingAspect.java: SyntaxError: ';' expected. (1:9)
[error] > 1 | package io.jhipster.demo.aop.logging;
[error] | ^
[error] 2 |
[error] 3 | import io.github.jhipster.config.JHipsterConstants;
[error] 4 |
from prettier-java.
Can you checkout this project (prettier-java) and run 'yarn test' just to give me an idea if that works.
And after that can you run out of that project 'yarn prettier --write "../tmp/**/*.java"', imagining your tmp project is in the same workspace as prettier-java.
Can't test your project in total because I have not the correct node version, but I did this example project https://github.com/thorbenvh8/jhipster-prettier here, 'yarn prettier LoggingAspect.java' works for me, prints it into the console, add --write to in place replacement.
Can you check if that works, thanks for investing the time solving this with me :)
from prettier-java.
yarn test
works, and indeed I have different errors:
[error] ../../tmp2/src/main/java/io/jhipster/demo/domain/User.java: Error: Sad sad panda, parsing errors detected in line: 222, column: 36!
[error] Expecting: one of these possible Token sequences:
[error] 1. [';']
[error] 2. [';']
[error] but found: '' +
[error] ", firstName=''
So that's definitely an improvement!
from prettier-java.
If you could create an issue with the minimal code that we need to reproduce that error?
And we still have to figure out why its not working when its standalone with comments in the other issue.
Im gonna close this issue! Thanks for helping
from prettier-java.
Can't test your project in total because I have not the correct node version
If you havenโt already, check out nvm
@thorbenvh8.
from prettier-java.
Related Issues (20)
- Migrate e2e pipeline tests to use Java 17 HOT 2
- Record pattern in exhaustive switch syntax unsupported HOT 4
- Support JDK 22 multiple patterns in switch case label HOT 3
- Support preview feature "Unnamed Classes and Instance main Methods "
- Support JDK 22 string templates HOT 1
- [FEATURE REQUEST] make online playground please HOT 2
- Don't split a short line static method to two lines. HOT 7
- Add formatted examples to readme
- Global formatter on macOS - cannot find package 'prettier-plugin-java' HOT 1
- checkstyle inconsistent with prettier HOT 2
- Make use of "Bracket Line" option
- (switch) case with braces not consistent with checkstyle HOT 2
- checkstyle RightCurly not correct when there are comments HOT 1
- Unexpected new line when assigning to a class member
- How do specify plugins without requiring a fully qualified path? HOT 1
- sort module-info
- prettier doesn't correct EmptyLineSeparator for checkstyle with comments
- Regression: more builder chaining being off
- Wrap long javadoc lines where possible
- Unknown 'es5' option for 'trailingComma' HOT 5
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 prettier-java.