Skip to content

Commit

Permalink
Update local CI running instructions for contributors (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrialDragon committed Mar 5, 2024
1 parent 911bf7b commit 21ef115
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -175,7 +175,13 @@ These may be appropriate to link in "next steps" however at the end of the examp
1. Third-party crates should be limited to the most essential, such as `rand`.
9. If additional code block attributes like `no_run` or `hide-lines=x-y` need to be specified, you should always order these so that the language is the last attribute. If we would specify `rust,no_run` the syntax highlighting wouldn't work, but changing it to `no_run,rust` makes it work.
10. To validate if local code changes are compiling you can `cd` into the `code-validation` folder and test your code using `cargo test`.
11. To make sure your markdown files are formatted correctly run `markdownlint -f -c .github/linters/.markdown-lint.yml .` in the root directory of your local Bevy website repository. In order to run the command you should install `markdownlint-cli`. See: <https://github.com/igorshubovych/markdownlint-cli>
11. To make sure your web-based files (html, markdown) are formatted correctly run the commands:
```
markdownlint -f -c .github/linters/.markdown-lint.yml .
djlint
typos
```
in the root directory of your local Bevy website repository. This will format markdown files and tell you the issues in HTML files. In order to run the command you should install `markdownlint-cli`, `djlint`, and `typos-cli`. See: <https://github.com/igorshubovych/markdownlint-cli>, <https://www.djlint.com/docs/getting-started/>, and <https://github.com/crate-ci/typos?tab=readme-ov-file#install>. Note that the CI also includes `editorconfigchecker` but there isn't an easy way to run this manually, so you should instead rely on CI to validate files with this tool.
12. To hide lines of code in Zola Rust code blocks of the book you should: a. Mark each line you wish to hide with a `#` with an empty space afterwards like `# //...line_of_code_here...` although you were hiding lines in rustdoc. b. Run the [utility tool](write-rustdoc-hide-lines) in `<ROOT_OF_WEBSITE>/write_rustdoc-hide-lines/` named `write_rustdoc_hide_lines.sh`.
13. To reference Rust API docs you can use markdown's reference-style links like so:
[`HashMap`]
Expand Down

0 comments on commit 21ef115

Please sign in to comment.