improved README, added lint counter

This commit is contained in:
llogiq 2015-08-24 16:23:05 +02:00
parent 45533bb03e
commit 380e41a914
2 changed files with 8 additions and 10 deletions

View file

@ -4,7 +4,7 @@
A collection of lints that give helpful tips to newbies and catch oversights.
##Lints
Lints included in this crate:
There are 45 lints included in this crate:
name | default | meaning
-------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@ -54,13 +54,6 @@ type_complexity | warn | usage of very complex types; recommends fac
unit_cmp | warn | comparing unit values (which is always `true` or `false`, respectively)
zero_width_space | deny | using a zero-width space in a string literal, which is confusing
To use, add the following lines to your Cargo.toml:
```
[dependencies]
clippy = "*"
```
More to come, please [file an issue](https://github.com/Manishearth/rust-clippy/issues) if you have ideas!
##Usage
@ -69,8 +62,8 @@ Compiler plugins are highly unstable and will only work with a nightly Rust for
Add in your `Cargo.toml`:
```toml
[dependencies.clippy]
git = "https://github.com/Manishearth/rust-clippy"
[dependencies]
clippy = "*"
```
Sample `main.rs`:

View file

@ -113,6 +113,11 @@ def main(print_only=False, check=False):
lambda: gen_table(lints),
write_back=not check)
changed |= replace_region('README.md',
r'^There are \d+ lints included in this crate:', "",
lambda: ['There are %d lints included in this crate:\n' % len(lints)],
write_back=not check)
# same for "clippy" lint collection
changed |= replace_region('src/lib.rs', r'reg.register_lint_group\("clippy"', r'\]\);',
lambda: gen_group(lints), replace_start=False,