Skip to content

Commit

Permalink
Auto merge of #945 - glyn:code-formatting-not-enforced, r=emilio
Browse files Browse the repository at this point in the history
Delete automatic code formatting guidelines

These are currently inaccurate as `cargo fmt` is not enforced for bindgen.
This section can be re-instated if and when code formatting is enforced.
  • Loading branch information
bors-servo authored Sep 4, 2017
2 parents e841f6f + 24f2683 commit 28de37e
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ out to us in a GitHub issue, or stop by
- [Testing a Single Header's Bindings Generation and Compiling its Bindings](#testing-a-single-headers-bindings-generation-and-compiling-its-bindings)
- [Authoring New Tests](#authoring-new-tests)
- [Test Expectations and `libclang` Versions](#test-expectations-and-libclang-versions)
- [Automatic code formatting](#automatic-code-formatting)
- [Pull Requests and Code Reviews](#pull-requests-and-code-reviews)
- [Generating Graphviz Dot Files](#generating-graphviz-dot-files)
- [Debug Logging](#debug-logging)
Expand Down Expand Up @@ -192,29 +191,6 @@ Where `$VERSION` is one of:

depending on which version of `libclang` you have installed.

## Automatic code formatting

We use [`rustfmt`](https://github.com/rust-lang-nursery/rustfmt) to enforce a
consistent code style across the whole `bindgen` code base. This is enforced in
CI, and your pull requests will get automatically rejected if you don't
re-format with the latest `rustfmt` before pushing.

You can install the latest version of `rustfmt` with this command:

```
$ cargo install -f rustfmt
```

Ensure that `~/.cargo/bin` is on your path.

Once that is taken care of, you can (re)format all code by running this command:

```
$ cargo fmt
```

The code style is described in the `rustfmt.toml` file in top level of the repo.

## Pull Requests and Code Reviews

Ensure that each commit stands alone, and passes tests. This enables better `git
Expand Down

0 comments on commit 28de37e

Please sign in to comment.