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

Use treefmt-nix command #37

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ indent_style = space
max_line_length = 120
trim_trailing_whitespace = true

[*.adoc]
[*.adoc,*.lock]
indent_size = unset

[*.{adoc,envrc,nix,nu,yaml,yml}]
[*.lock]
indent_style = unset

[*.{adoc,envrc,lock,nix,nu,yaml,yml}]
max_line_length = off

[{justfile,.justfile,*.just,*.rs}]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/treefmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@v16
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Run treefmt
run: nix develop --command treefmt --ci
run: nix develop --command treefmt-nix --ci
- uses: reviewdog/action-suggester@v1
with:
fail_on_error: true
github_token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
tool_name: treefmt
tool_name: treefmt-nix
8 changes: 4 additions & 4 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ build board="attiny85" profile="dev":
alias fmt := format

format:
treefmt
treefmt-nix

alias f := run
alias flash := run
Expand Down Expand Up @@ -78,8 +78,8 @@ update:
nix run ".#update-nixos-release"
nix flake update
cd "{{ justfile_directory() }}/boards/attiny85"
cargo update
cargo update --verbose
cd "{{ justfile_directory() }}/boards/pico"
cargo update
cargo update --verbose
cd "{{ justfile_directory() }}/boards/qt-py-ch32v203"
cargo update
cargo update --verbose
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"ifdef",
"ifndef",
"ihex",
"jsonfmt",
"justfile",
"Libc",
"libusbx",
Expand All @@ -32,6 +33,7 @@
"Micropython",
"mogrify",
"MOSI",
"nixfmt",
"nixos",
"Noctua",
"nostd",
Expand All @@ -48,18 +50,23 @@
"rustc",
"rustfmt",
"rustup",
"statix",
"SWCLK",
"SWDIO",
"taplo",
"thumbv",
"tinyusb",
"tlsv",
"treefmt",
"uaccess",
"UART",
"udev",
"udisksctl",
"usermod",
"VBUS",
"wchisp"
"wchisp",
"webp",
"yamlfmt"
],
"files.watcherExclude": {
"**/.direnv/**": true,
Expand Down
2 changes: 1 addition & 1 deletion boards/attiny85/.justfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ alias up := update

update:
nix flake update
cargo update
cargo update --verbose
16 changes: 8 additions & 8 deletions boards/attiny85/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions boards/attiny85/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ homepage = "https://github.com/jwillikers/pwm-fan-controller"
description = "A simple PWM fan controller for microcontrollers"
license = "MIT OR Apache-2.0"
repository = "https://github.com/jwillikers/pwm-fan-controller.git"
# autobin = false

[dependencies]
embedded-hal = "1.0.0"
nb = "1.1.0"
panic-halt = "0.2.0"
ufmt = "0.2.0"
embedded-hal = "1.0"
nb = "1.1"
panic-halt = "1.0"
ufmt = "0.2"

#[dependencies.avr-device]
#version = "0.4.0"
#version = "0.6.0"
#features = ["attiny85"]

[dependencies.avr-hal-generic]
Expand Down
1 change: 1 addition & 0 deletions boards/attiny85/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[toolchain]
channel = "nightly-2024-03-22"
# channel = "nightly"
components = ["llvm-tools-preview", "rust-src"]
profile = "minimal"
targets = ["avr-unknown-none-attiny85.json"]
2 changes: 1 addition & 1 deletion boards/pico/.justfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ alias up := package

update:
nix flake update
cargo update
cargo update --verbose
Loading
Loading