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

Testing Formatter Idempotence #200

Open
PauliusKu opened this issue Sep 13, 2024 · 1 comment · May be fixed by #294
Open

Testing Formatter Idempotence #200

PauliusKu opened this issue Sep 13, 2024 · 1 comment · May be fixed by #294
Assignees
Labels
testing Testing improvement or issue fix

Comments

@PauliusKu
Copy link
Collaborator

PauliusKu commented Sep 13, 2024

Come up with a practical solution how to ensure formatter idempotence. https://en.wikipedia.org/wiki/Idempotence

@PauliusKu PauliusKu added the enhancement New feature or request label Sep 13, 2024
@PauliusKu PauliusKu changed the title Testing Idempotence Testing Formatter Idempotence Sep 13, 2024
@gustason
Copy link
Collaborator

A possible solution: create unit tests that run the formatter more than once. In the case of failing tests, explore ways to implement idempotence on a case-by-case basis.

Another possibility is to rerun the formatter only if the user has changed something in the file. It requires a smart system, however, it also ensures true idempotence.

@PauliusKu PauliusKu added tech debt Technical debt and removed enhancement New feature or request labels Dec 5, 2024
@PauliusKu PauliusKu self-assigned this Jan 17, 2025
@PauliusKu PauliusKu linked a pull request Jan 17, 2025 that will close this issue
@PauliusKu PauliusKu added this to the Marketplace Launch Release milestone Jan 21, 2025
@PauliusKu PauliusKu assigned gustason and unassigned PauliusKu Jan 23, 2025
@PauliusKu PauliusKu added testing Testing improvement or issue fix and removed tech debt Technical debt labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Testing improvement or issue fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants