Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier not run on api/queries #114

Closed
sschuberth opened this issue May 15, 2024 · 3 comments
Closed

Prettier not run on api/queries #114

sschuberth opened this issue May 15, 2024 · 3 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@sschuberth
Copy link

Describe the bug

With --format prettier, no formatting seems to happen for files generated in api/queries.

To Reproduce

Create a .prettierrc with some non-default formatting setting and run with --format prettier.

OpenAPI spec file

n/a

Expected behavior

File in api/queries should get formatted just like the ones in api/requests do.

Screenshots

n/a

  • OS: Linux and Windows
  • Version: v1.3.0

Additional context

The effect can be seen in https://github.com/eclipse-apoapsis/ort-server/pull/224/files.

@seriouslag
Copy link
Collaborator

@7nohe
I am starting to believe we should remove the feature and let the consumers run linting and formatting as duplicating the work of the underlying service generator will be difficult to maintain parity as they do not expose it to other files.

A work around is running the pretter after running the service gen.

@seriouslag seriouslag added help wanted Extra attention is needed question Further information is requested labels May 15, 2024
@7nohe
Copy link
Owner

7nohe commented May 18, 2024

@7nohe I am starting to believe we should remove the feature and let the consumers run linting and formatting as duplicating the work of the underlying service generator will be difficult to maintain parity as they do not expose it to other files.

A work around is running the pretter after running the service gen.

@seriouslag
I agree with you. Typically, users do import the output and call functions, but they do not usually modify it. It is best to allow users to make any desired changes after the generation.

@sschuberth
Copy link
Author

sschuberth commented May 18, 2024

For the same reason as mentioned here, let's just close this in favor of removing the --format option going forward.

@sschuberth sschuberth closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants