Use nightly toolchain in workflows so format action works (#22) The configuration in rustfmt.toml appears to rely on features that are not in the stable toolchain, as evidenced by the warnings in the 'check formatting' stage of the Build workflow (ex: https://github.com/mskelton/dtsfmt/actions/runs/16820506520/job/47646281792). Switching the action to use +nightly gets the workflow back to formating as desired. Also run a +nightly `cargo fmt` to get everything in sync and see that the workflow completes without warnings.
Auto formatter for device tree files.
You can install dtsfmt by running the install script which will download the latest release.
curl -LSfs https://go.mskelton.dev/dtsfmt/install | sh
Or you can build from source.
git clone --recurse-submodules https://github.com/mskelton/dtsfmt.git cd dtsfmt cargo install --path .
To run dtsfmt, simply provide a file/directory path to the dtsfmt command.
dtsfmt .
The following configuration options are available for dtsfmt. Configuration should be added to a .dtsfmtrc.toml file at the root of your project.
layout = "kinesis:adv360" # Required # Available options are ["kinesis:adv360", "sweep", "moergo:glove80"]
You can add a .dtsfmtignore file at the root of your project to exclude files and paths from formatting. This file follows the same rules as .gitignore.
--checkWhen you want to check if your files are formatted, you can run dtsfmt with the --check flag (or -c). This will output a human-friendly message and a list of unformatted files, if any.
dtsfmt --check .
--emitYou can change the way dtsfmt emits the changes with the --emit flag.
dtsfmt --emit=stdout