From 2b27c20cad77451e9bd5b18c134af0a3a7cb6e9b Mon Sep 17 00:00:00 2001 From: psteinroe Date: Wed, 19 Feb 2025 09:41:52 +0100 Subject: [PATCH 1/4] chore: update justfile --- justfile | 73 +++++++------------------------------------------------- 1 file changed, 9 insertions(+), 64 deletions(-) diff --git a/justfile b/justfile index aafa199fd..d63eac9e9 100644 --- a/justfile +++ b/justfile @@ -3,9 +3,8 @@ _default: alias f := format alias t := test -# alias r := ready +alias r := ready alias l := lint -# alias qt := test-quick # Installs the tools needed to develop install-tools: @@ -17,19 +16,6 @@ upgrade-tools: cargo install cargo-binstall --force cargo binstall cargo-insta taplo-cli --force -# Generate all files across crates and tools. You rarely want to use it locally. -gen-all: - cargo run -p xtask_codegen -- all - # cargo codegen-configuration -# cargo codegen-migrate -# just gen-bindings -# just format - -# Generates TypeScript types and JSON schema of the configuration -# gen-bindings: -# cargo codegen-schema -# cargo codegen-bindings - # Generates code generated files for the linter gen-lint: cargo run -p xtask_codegen -- analyser @@ -39,22 +25,12 @@ gen-lint: cargo run -p rules_check just format -# Generates the linter documentation and Rust documentation -# documentation: -# RUSTDOCFLAGS='-D warnings' cargo documentation - # Creates a new lint rule in the given path, with the given name. Name has to be camel case. Group should be lowercase. new-lintrule group rulename: cargo run -p xtask_codegen -- new-lintrule --category=lint --name={{rulename}} --group={{group}} just gen-lint # just documentation -# Creates a new lint rule in the given path, with the given name. Name has to be camel case. -# new-assistrule rulename: -# cargo run -p xtask_codegen -- new-lintrule --kind=js --category=assist --name={{rulename}} -# just gen-lint -# just documentation - # Format Rust files and TOML files format: cargo fmt @@ -80,27 +56,6 @@ test-crate name: test-doc: cargo test --doc -# Tests a lint rule. The name of the rule needs to be camel case -# test-lintrule name: -# just _touch crates/biome_js_analyze/tests/spec_tests.rs -# just _touch crates/biome_json_analyze/tests/spec_tests.rs -# just _touch crates/biome_css_analyze/tests/spec_tests.rs -# just _touch crates/biome_graphql_analyze/tests/spec_tests.rs -# cargo test -p biome_js_analyze -- {{snakecase(name)}} --show-output -# cargo test -p biome_json_analyze -- {{snakecase(name)}} --show-output -# cargo test -p biome_css_analyze -- {{snakecase(name)}} --show-output -# cargo test -p biome_graphql_analyze -- {{snakecase(name)}} --show-output - -# Tests a lint rule. The name of the rule needs to be camel case -# test-transformation name: -# just _touch crates/biome_js_transform/tests/spec_tests.rs -# cargo test -p biome_js_transform -- {{snakecase(name)}} --show-output - -# Run the quick_test for the given package. -# test-quick package: -# cargo test -p {{package}} --test quick_test -- quick_test --nocapture --ignored - - # Alias for `cargo clippy`, it runs clippy on the whole codebase lint: cargo clippy @@ -110,16 +65,14 @@ lint-fix: cargo clippy --fix cargo run -p rules_check -# When you finished coding, run this command to run the same commands in the CI. -# ready: -# git diff --exit-code --quiet -# just gen-all -# just documentation -# #just format # format is already run in `just gen-all` -# just lint -# just test -# just test-doc -# git diff --exit-code --quiet +# When you finished coding, run this command. Note that you should have already committed your changes. +ready: + git diff --exit-code --quiet + cargo run -p xtask_codegen -- all + cargo run -p docs_codegen + just lint --fix + just format + git diff --exit-code --quiet # Creates a new crate new-crate name: @@ -130,14 +83,6 @@ new-crate name: tree-print file: cargo run --bin tree_print -- -f {{file}} -# Creates a new changeset for the final changelog -# new-changeset: -# knope document-change - -# Dry-run of the release -# dry-run-release *args='': -# knope release --dry-run {{args}} - clear-branches: git branch --merged | egrep -v "(^\\*|main)" | xargs git branch -d From fcf357dde5fbca1d9046ec56bd2dd9b15c7f2681 Mon Sep 17 00:00:00 2001 From: psteinroe Date: Wed, 19 Feb 2025 09:45:06 +0100 Subject: [PATCH 2/4] chore: update justfile --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index d63eac9e9..00a406b7c 100644 --- a/justfile +++ b/justfile @@ -68,7 +68,7 @@ lint-fix: # When you finished coding, run this command. Note that you should have already committed your changes. ready: git diff --exit-code --quiet - cargo run -p xtask_codegen -- all + cargo run -p xtask_codegen -- configuration cargo run -p docs_codegen just lint --fix just format From 8d198b90e2fea27460180c7032413155ed4d5f6b Mon Sep 17 00:00:00 2001 From: psteinroe Date: Wed, 19 Feb 2025 09:45:51 +0100 Subject: [PATCH 3/4] chore: update justfile --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index 00a406b7c..8fcec7b63 100644 --- a/justfile +++ b/justfile @@ -70,7 +70,7 @@ ready: git diff --exit-code --quiet cargo run -p xtask_codegen -- configuration cargo run -p docs_codegen - just lint --fix + just lint-fix just format git diff --exit-code --quiet From 86f1a846455b556b640f874cec22a2d91e927ee4 Mon Sep 17 00:00:00 2001 From: psteinroe Date: Wed, 19 Feb 2025 09:48:05 +0100 Subject: [PATCH 4/4] fix: add comment to job name --- .github/workflows/pull_request.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index b22a1d40b..59609e4f1 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -88,13 +88,6 @@ jobs: run: | cargo clippy cargo run -p rules_check - # - name: Check for git diff after lint fix - # run: | - # if [[ $(git status --porcelain) ]]; then - # git status - # git diff - # exit 1 - # fi # check-dependencies: # name: Check Dependencies @@ -183,7 +176,7 @@ jobs: run: cargo run -p xtask_codegen -- configuration - name: Run the docs codegen run: cargo run -p docs_codegen - - name: Check for git diff + - name: Check for git diff -- run "just ready" if you see an error run: | if [[ $(git status --porcelain) ]]; then git status