Skip to content

chore: update justfile #211

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

Merged
merged 4 commits into from
Feb 19, 2025
Merged
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
9 changes: 1 addition & 8 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
73 changes: 9 additions & 64 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 -- configuration
cargo run -p docs_codegen
just lint-fix
just format
git diff --exit-code --quiet

# Creates a new crate
new-crate name:
Expand All @@ -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

Expand Down