GithubHelp home page GithubHelp logo

Comments (7)

tvonhacht avatar tvonhacht commented on May 19, 2024

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.

tvonhacht avatar tvonhacht commented on May 19, 2024

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.

jdubois avatar jdubois commented on May 19, 2024

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.

tvonhacht avatar tvonhacht commented on May 19, 2024

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.

jdubois avatar jdubois commented on May 19, 2024

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.

tvonhacht avatar tvonhacht commented on May 19, 2024

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.

j-f1 avatar j-f1 commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.