From 940bcf9b0f68e4a94a26e415b6afb13d4cb776eb Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Tue, 26 Jan 2021 13:05:33 -0700 Subject: [PATCH] Add Contributing Info (#1309) * Add a CONTRIBUTING.md * Point to book. Add tools/ci script. * Update contributing link to point to book --- .github/CONTRIBUTING.md | 4 ++++ README.md | 3 ++- tools/ci | 20 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/CONTRIBUTING.md create mode 100755 tools/ci diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000000..49fda44c9a --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,4 @@ +# Contributing + +Please see the [Contributing Code](https://bevyengine.org/learn/book/contributing/code/) section of +[The Book](https://bevyengine.org/learn/book/introduction/). \ No newline at end of file diff --git a/README.md b/README.md index 0c1e79045b..35ea02ae02 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,8 @@ Bevy is still in the _very_ early stages of development. APIs can and will chang ## Community -Before contributing or participating in discussions with the community, you should familiarize yourself with our **[Code of Conduct](https://github.com/bevyengine/bevy/blob/master/CODE_OF_CONDUCT.md)** +Before contributing or participating in discussions with the community, you should familiarize yourself with our **[Code of Conduct](https://github.com/bevyengine/bevy/blob/master/CODE_OF_CONDUCT.md)** and +**[How to Contribute](https://bevyengine.org/learn/book/contributing/code/)** * **[Discord](https://discord.gg/gMUk5Ph):** Bevy's official discord server. * **[Reddit](https://reddit.com/r/bevy):** Bevy's official subreddit. diff --git a/tools/ci b/tools/ci new file mode 100755 index 0000000000..aa970e108b --- /dev/null +++ b/tools/ci @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# This script is intended to mimic some CI behavior that we encourage contributors to run locally. +# For the actual CI run on GitHub, see the files in .github/workflows/ + +# Exit when any command fails +set -e + +# Keep track of the last executed command +trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG +# Echo an error message before exiting, so you can see exactly what command and what error code +trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT + +## ACTUAL COMMANDS + +# Auto-format Rust files +cargo +nightly fmt --all + +# Run a more intensive linter +cargo clippy --all-targets --all-features -- -D warnings -A clippy::type_complexity -A clippy::manual-strip \ No newline at end of file