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

just: Add just fmt #2679

Merged
merged 1 commit into from May 3, 2024
Merged

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Apr 11, 2024

We already have a just command to check the formatting, add one to run the formatter. Use the more terse just fmt although the difference from just format is not super obvious it is documented in the default output of just.

With this applied we have

$ just
Available recipes:
    build             # Cargo build everything.
    check             # Cargo check everything.
    default
    fmt               # Run cargo fmt
    format            # Check the formatting
    lint              # Lint everything.
    sane              # Quick and dirty CI useful for pre-push checks.
    update-lock-files # Update the recent and minimal lock files.

We already have a `just` command to check the formatting, add one to run
the formatter. Use the more terse `just fmt` although the difference
from `just format` is not super obvious it is documented in the default
output of `just`.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8640320775

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.127%

Totals Coverage Status
Change from base Build 8629812825: 0.0%
Covered Lines: 19189
Relevant Lines: 23084

💛 - Coveralls

@dpc
Copy link
Contributor

dpc commented Apr 11, 2024

If you can fix formatting, "checking formatting" is redundant. Might as well run format and see if there were any changes. In Fedimint we have just format doing formatting for Rust, Nix, and no one every asked for check-format.

@tcharding
Copy link
Member Author

Yeah I thought the same, but its nice to be able to check it without making the changes:

  • so one doesn't have to reset the changes
  • if one has a dirty working directory and doesn't want to mix formatting changes in

@apoelstra
Copy link
Member

If you can fix formatting, "checking formatting" is redundant

It's not. "Fixing formatting" is a destructive operation that affects an unpredictable number of files. Checking formatting is not.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e565e06

@tcharding
Copy link
Member Author

tcharding commented May 3, 2024

Candidate for merge now please, acked and open for over two weeks with no comments or nacks.

@apoelstra apoelstra merged commit ecfe556 into rust-bitcoin:master May 3, 2024
168 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants