Skip to content
New issue

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

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

Already on GitHub? # to your account

Add format-incremental script #223

Merged
merged 6 commits into from
Mar 7, 2025
Merged

Conversation

mhucka
Copy link
Contributor

@mhucka mhucka commented Mar 2, 2025

This is a rewritten version of Cirq's check/format-incremental script. Changes:

  • Added a --help option
  • Added a --no-color option
  • Added a --quiet option
  • Make the script more robust in various ways (e.g., declare variables, be more careful in parsing CLI arguments, etc.)
  • Don't hard-code ANSI color code sequences in every echo statement
  • Make the script more DRY
  • Revise the error & info messages to try to be slightly more clear

A motivation for making these changes is to produce an updated, somewhat more user-friendly version of format-incremental that can be used in all Quantumlib repos, including for new projects/repos that are being planned in the near future.

mhucka added 2 commits March 2, 2025 10:30
This is a rewritten version of Cirq's `check/format-incremental`
script. Changes:

- Added a `--help` option
- Added a `--no-color` option
- Added a `--quiet` option
- Make the script more robust in various ways (e.g., declare
  variables, be more careful in parsing CLI arguments, etc.)
- Don't hard-code ANSI color code sequences in every echo statement
- Make the script more DRY
- Revise the error & info messages to try to be slightly more clear
@mhucka mhucka marked this pull request as ready for review March 3, 2025 16:33
@mhucka mhucka requested a review from dstrain115 March 3, 2025 16:33
@mhucka mhucka merged commit b8ce3a9 into quantumlib:main Mar 7, 2025
6 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants