Skip to content

Conversation

@drupol
Copy link
Owner

@drupol drupol commented Jul 22, 2025

This PR

  • the path argument is variadic

Fix #6

@drupol
Copy link
Owner Author

drupol commented Jul 22, 2025

@wolfgangwalther Feel free to review it :)

@wolfgangwalther
Copy link
Contributor

Diff looks good, but something doesn't quite work, yet, I think.

I put this PR's rev into the treefmt-mdcr-nixpkgs PR and removed the script. mdcr takes multiple files and doesn't complain about that, OK. Some files are formatted well. But others are not, and I get strange syntax errors.... but rightly so. I think I just found out that my bash wrapper didn't work properly, yet :D

Still something is odd in the log output:

[2025-07-22T15:33:38Z ERROR mdcr::runner] The command `nixfmt ` returned a non-zero exit status (1) for preset `nixfmt` in `nixos/doc/manual/administration/service-mgmt.chapter.md:127-140`, `<stdin>:1:28:
      |
    1 | systemd.services.myservice = {
      |                            ^
    unexpected '='
    expecting "or", '.', end of input, operator, or term`
[2025-07-22T15:33:38Z ERROR mdcr] Error processing nixos/doc/manual/administration/service-mgmt.chapter.md:

The order of log outputs, the second line ("Error processing ...:") should come first, I think? Otherwise the : doesn't make sense.

@drupol drupol force-pushed the push-rlmnmnvmzuyt branch from 9bd2a1a to f91b392 Compare July 22, 2025 15:45
@drupol
Copy link
Owner Author

drupol commented Jul 22, 2025

Fixed, try again please.

@wolfgangwalther
Copy link
Contributor

I think I just found out that my bash wrapper didn't work properly, yet :D

Or maybe not. I think the previous version didn't report syntax errors properly (aka, at all)? Looks like the error logging was only really added here?

@drupol
Copy link
Owner Author

drupol commented Jul 22, 2025

I think I just found out that my bash wrapper didn't work properly, yet :D

Or maybe not. I think the previous version didn't report syntax errors properly (aka, at all)? Looks like the error logging was only really added here?

It should not, the logging hasn't changed, please try again and let me know.

@drupol drupol force-pushed the push-rlmnmnvmzuyt branch from f91b392 to bf68f83 Compare July 22, 2025 15:47
@wolfgangwalther
Copy link
Contributor

Ah my basc script needed set -e... now the current nixpkgs' version is reporting errors as well. Will try your latest branch again now.

@drupol drupol force-pushed the push-rlmnmnvmzuyt branch from bf68f83 to ae9c179 Compare July 22, 2025 15:50
Copy link
Contributor

@wolfgangwalther wolfgangwalther left a comment

Choose a reason for hiding this comment

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

Works for me! Thank you ❤️!

@drupol drupol merged commit 69bfed3 into main Jul 22, 2025
3 checks passed
@drupol drupol deleted the push-rlmnmnvmzuyt branch July 22, 2025 16:04
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.

Adhere to Treefmt Formatter Specification

3 participants