nixd icon indicating copy to clipboard operation
nixd copied to clipboard

document nixf-tidy

Open mightyiam opened this issue 1 year ago • 1 comments

Thank you for nixd and nixf-tidy.

I want to use nixf-tidy to lint my project, both locally and in GitHub Actions.

But I couldn't find any documentation for this.

Running the nixf-tidy command seems to run a process that never exits and does not provide output.

I did find the https://github.com/inclyc/nixf-tidy-action repo, but it is not via a GitHub Action that I would like to use it.

mightyiam avatar May 16 '24 00:05 mightyiam

Running the nixf-tidy command seems to run a process that never exits and does not provide output.

For now it reads the standard input as the source file. You may use it like:

cat somefile.nix | nixf-tidy

The result is JSON format and may not suitable for human reading. And currently it does not have a command line UI. The tooling itself is designed to be invoked by some "UI" tools, e.g. a language server, or github action, or github bot.

I want to use nixf-tidy to lint my project, both locally and in GitHub Actions.

For locally usage nixf-tidy shares the frontend of nixd, using nixd is effectively using nixf-tidy locally.

But I couldn't find any documentation for this.

Yes, there should be some documentation.

inclyc avatar May 16 '24 10:05 inclyc

Thank you!

mightyiam avatar May 23 '24 16:05 mightyiam