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

Check diff before "pretty-print on save" #39

Open
marceltaeumel opened this issue Jun 29, 2021 · 2 comments
Open

Check diff before "pretty-print on save" #39

marceltaeumel opened this issue Jun 29, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@marceltaeumel
Copy link

I suggest that the "pretty-print on save" scopes itself to the changed portion of code to avoid re-formatting a (legacy) method with a different style. That it, a fix in a single line of code can be reviewed faster if the code around does not change.

(Hmm... maybe the poppy print could also scan for a specific style and reconfigure itself on-the-fly :)

@tom95
Copy link
Collaborator

tom95 commented Jun 29, 2021

Currently, poppy-print is "opinionated by design", that is to mean: format it one way and no other. Personally, I think introducing preferences might be something that is an option further down the road but I would prefer getting to a very good and stable formatting following a single style first.

Integrating with a diff on regions of text is an interesting idea. I can think of a number of scenarios where it might catastrophically break, depending on the implementation, but also a number of scenarios where it would be quite convenient and also likely straightforward to implement.

@marceltaeumel
Copy link
Author

Currently, poppy-print is "opinionated by design"

I know. :-) It would be nice if this project would add "expressing your thoughts through text" to one of its basic values. Implicit knowledge remains one of the biggest challenges in program comprehension.

@LinqLover LinqLover added the enhancement New feature or request label Apr 27, 2022
@AlexanderUngefug AlexanderUngefug removed their assignment May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants