Skip to content

Commit

Permalink
Add linter section to CLI README.md (#244)
Browse files Browse the repository at this point in the history
Closes #239!

The section is pretty sparse, especially because I intentionally omitted
the installation instructions (they're too complicated + too likely to
go out-of-date, in my opinion).

As an extra drive-by fix, I switched the `cli` code block attributes to
`sh`, which fixes syntax highlighting for me in VSCode. I can revert
this if it's not desired!
  • Loading branch information
BD103 authored Jan 24, 2025
1 parent 97aa315 commit 3a4db2d
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you need assistance or want to help, reach out to the [`bevy_cli` working gro

At this point, the CLI is not published as a package yet and needs to be installed via git:

```cli
```sh
cargo install --git https://github.com/TheBevyFlock/bevy_cli --locked bevy_cli
```

Expand All @@ -32,7 +32,7 @@ Necessary tools will also be installed automatically.
>
> The arguments you know from `cargo` (like `--release`) must be placed before the `web` subcommand, while the web-specific options (like `--open`) must be placed afterwards, e.g.
>
> ```cli
> ```sh
> bevy run --release web --open
> ```
Expand Down Expand Up @@ -77,10 +77,32 @@ These prompts will break your pipeline if they are triggered in CI.

To avoid this problem, use the `--yes` flag to automatically confirm the prompts:

```cli
```sh
bevy build --yes web
```

## Linter

The CLI has 1st-party support for `bevy_lint`, the static analysis tool that checks over your code (similar to Clippy!). It must be installed first using the [installation guide], but then you can run the linter with the `lint` subcommand:

```sh
bevy lint
```

This command uses the same arguments as `cargo check`:

```sh
bevy lint --workspace --all-features
```

You can view a full list of supported options with:

```sh
bevy lint -- --help
```

[installation guide]: https://thebevyflock.github.io/bevy_cli/bevy_lint/index.html#installation

## License

The Bevy CLI is licensed under either of
Expand Down

0 comments on commit 3a4db2d

Please sign in to comment.