mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 03:50:58 +00:00
ci(core): add rustfmt to style checks
[no changelog]
This commit is contained in:
parent
7832b2f140
commit
c80c8edf70
13
Makefile
13
Makefile
@ -9,9 +9,9 @@ PY_FILES = $(shell find . -type f -name '*.py' | grep -f ./tools/style.py.incl
|
|||||||
C_FILES = $(shell find . -type f -name '*.[ch]' | grep -f ./tools/style.c.include | grep -v -f ./tools/style.c.exclude )
|
C_FILES = $(shell find . -type f -name '*.[ch]' | grep -f ./tools/style.c.include | grep -v -f ./tools/style.c.exclude )
|
||||||
|
|
||||||
|
|
||||||
style_check: pystyle_check cstyle_check changelog_check yaml_check editor_check ## run all style checks (C+Py)
|
style_check: pystyle_check ruststyle_check cstyle_check changelog_check yaml_check editor_check ## run all style checks
|
||||||
|
|
||||||
style: pystyle cstyle ## apply all code styles (C+Py)
|
style: pystyle ruststyle cstyle ## apply all code styles (C+Rust+Py)
|
||||||
|
|
||||||
pystyle_check: ## run code style check on application sources and tests
|
pystyle_check: ## run code style check on application sources and tests
|
||||||
flake8 --version
|
flake8 --version
|
||||||
@ -71,6 +71,15 @@ defs_check: ## check validity of coin definitions and protobuf files
|
|||||||
python3 common/protob/check.py
|
python3 common/protob/check.py
|
||||||
python3 common/protob/graph.py common/protob/*.proto
|
python3 common/protob/graph.py common/protob/*.proto
|
||||||
|
|
||||||
|
ruststyle:
|
||||||
|
@echo [RUSTFMT]
|
||||||
|
@cd core/embed/rust ; cargo fmt
|
||||||
|
|
||||||
|
ruststyle_check:
|
||||||
|
rustfmt --version
|
||||||
|
@echo [RUSTFMT]
|
||||||
|
@cd core/embed/rust ; cargo fmt -- --check
|
||||||
|
|
||||||
## code generation commands:
|
## code generation commands:
|
||||||
|
|
||||||
mocks: ## generate mock python headers from C modules
|
mocks: ## generate mock python headers from C modules
|
||||||
|
@ -28,6 +28,9 @@ let
|
|||||||
"thumbv7em-none-eabihf" # TT
|
"thumbv7em-none-eabihf" # TT
|
||||||
"thumbv7m-none-eabi" # T1
|
"thumbv7m-none-eabi" # T1
|
||||||
];
|
];
|
||||||
|
# we use rustfmt from nixpkgs because it's built with the nighly flag needed for wrap_comments
|
||||||
|
# to use official binary, remove rustfmt from buildInputs below and uncomment next line:
|
||||||
|
# extensions = [ "rustfmt" ];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
with nixpkgs;
|
with nixpkgs;
|
||||||
|
Loading…
Reference in New Issue
Block a user