bevy/docs/linters.md
MinerSebas 8a9f475edb Remove the Clippy "-A clippy::manual-strip" override (#1619)
That override was added to support pre 1.45 Versions of Rust, but Bevy requires currently the latest stable rust release.
This means that the reason for the override doesn't apply anymore.
2021-03-12 03:05:14 +00:00

2 KiB

Linters in this Repository

rustfmt

Can be automatically be run with the CI Script together with Clippy or manually with this command:

cargo +nightly fmt --all

Clippy

Can be automatically be run with the CI Script together with rustfmt or manually with this command:

cargo clippy --all-targets --all-features -- -D warnings -A clippy::type_complexity -A clippy::manual-strip
  • -D warnings: No warnings are allowed in the codebase.
  • -A clippy::type_complexity: type complexity must be ignored because we use huge templates for queries.

super-linter

super-linter provides easy access to many different Linters.

markdownlint

markdownlint is provided by super-linter and is responsible for .md files. Its configuration is saved in the .markdown-lint.yml file.

The provided rules are documented here and information about setting the config can be seen here.

Using VS Code markdownlint

If you want to use the VS Code Extension with the rules defined in .markdown-lint.yml, then you need to create a local config file in the root of the project with the configuration below. Currently, this is not needed as the extension already disables the rule MD013 by default.

{
  "extends": ".github/linters/.markdown-lint.yml"
}

Other Linters provided by super-linter

All other linters not mentioned in the this file are not activated and can be seen here.