GitXplorerGitXplorer
m

dtsfmt

public
17 stars
6 forks
1 issues

Commits

List of commits on branch main.
Verified
fe7abef98a5bb94360270bbac698594aacdf58e1

Format

mmskelton committed 3 months ago
Verified
a510faef27a3d4c3df610ffbd968a897ab520a06

add glove80 layout (#15)

jjuliamertz committed 3 months ago
Verified
7e652825d42313e8cca065fef16bb623d6e122f8

Readme update (#14)

nnmenon committed 4 months ago
Verified
37d29553be681a073bf187adf5c5042b76143a7b

Fix printer for properties without a value

mmskelton committed 6 months ago
Verified
799442e7ec8d51e0ed859d761cd76f4e3b500305

Support `.dtsfmtignore` for stdin (#12)

mmskelton committed 7 months ago
Verified
ff4a344c39b4ad67841580e372d8f04be54ba271

Update parser

mmskelton committed 7 months ago

README

The README file for this repository.

dtsfmt

Auto formatter for device tree files.

Installation

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 .

Usage

To run dtsfmt, simply provide a file/directory path to the dtsfmt command.

dtsfmt .

Config

The following confirmation options are available for dtsfmt. Confirmation should be added to a .dtsfmtrc.toml file at the root of your project.

layout = "kinesis:adv360"

Ignoring code

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.

Flags

--check

When 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 .

--emit

You can change the way dtsfmt emits the changes with the --emit flag.

dtsfmt --emit=stdout