Commit Graph

67 Commits

Author SHA1 Message Date
Philipp Krones
5b24f23020
Update println! formatting
Co-Authored-By: phansch <dev@phansch.net>
2018-11-05 07:18:47 +01:00
Philipp Hansch
90f31e21ab
RIIR update lints: Add check mode (update_lints.py rewrite complete)
This finishes up the rewrite of `update_lints.py` in Rust. More
specifically, this

* adds the `--check` flag and handling to clippy_dev
* tracks file changes over the different calls to `replace_region_in_file`
* only writes changes to files if the `--check` flag is *not* used
* runs `./util/dev update_lints --check` on CI instead of the old script
* replaces usage of the `update_lints.py` script with an error

`./util/dev update_lints` behaves 99% the same as the python script.
The only difference that I'm aware of is an ordering change to
`clippy_lints/src/lib.rs` because underscores seem to be sorted
differently in Rust and in Python.

🏁
2018-11-05 07:18:47 +01:00
Philipp Hansch
facfb5a7a9
Fix typo 2018-11-03 18:48:39 +01:00
Philipp Hansch
cca50701d9
Improve clippy_dev help text 2018-11-03 13:43:35 +01:00
Philipp Hansch
4f38538d75
RIIR update lints: Generate lint group registrations 2018-11-03 13:43:35 +01:00
Philipp Hansch
5fc25d30e2
RIIR update lints: Generate modules section 2018-11-03 09:09:34 +01:00
Philipp Hansch
7e027217f1
Fix dogfood and pedantic lints 2018-10-31 21:54:30 +01:00
Philipp Hansch
64bd658516
RIIR update lints: Generate deprecated lints
The update script now also generates the 'register_removed' section in
`clippy_lints/src/lib.rs`.

Also, instead of using `let mut store ...`, I added a new identifier
line so that the replacement will continue to work in case `let mut
store ...` ever changes.
2018-10-31 08:03:50 +01:00
Philipp Hansch
9f3ac4e5a3
RIIR update_lints: Update changelog links
This now also updates the link list at the bottom of the changelog.
2018-10-17 08:18:05 +02:00
Philipp Hansch
956987f43e
RIIR update_lints: Replace lint count in README.md
This allows the usage of `util/dev update_lints` which will write the
new lint_count to the `README.md`.
2018-10-16 08:14:32 +02:00
Philipp Hansch
af441b5b07
Rename active_lints to usable_lints
Because now `usable_lints` will also exclude internal lints.
2018-10-16 08:09:32 +02:00
Philipp Hansch
b61ca63c5e
sort_by -> sort_by_key 2018-10-15 21:02:38 +02:00
Philipp Hansch
759ceb9840
Use impl Iterator in arg position in clippy_dev
Small refactoring pulled out of work on #3266.
This should make the methods a bit more flexible.
2018-10-11 08:34:51 +02:00
Manish Goregaokar
e9c025ea70 Add license header to Rust files 2018-10-06 09:43:08 -07:00
Philipp Hansch
79bec036f8
Return impl Iterator instead of Vec<Lint>
This makes the API of `lib.rs` a bit more flexible.
2018-09-05 13:34:28 +02:00
Philipp Hansch
586ef4ed72
Refactor to use into_group_map from Itertools 2018-09-03 22:18:53 +02:00
Philipp Hansch
35f100b4f9
update_lints rewrite: Add structure and --print-only 2018-09-03 22:18:51 +02:00