Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

RIIR update_lints: Replace lint count in README.md #3325

Merged

Conversation

phansch
Copy link
Member

@phansch phansch commented Oct 16, 2018

This enables the usage of util/dev update_lints which will write the current
lint count to the README.md.

This also adds two new methods: replace_region_in_file and replace_region_in_text which handle all the meaty stuff of replacing regions of text. For now these are only used to update the lint count in README.md

cc #2882

Because now `usable_lints` will also exclude internal lints.
@phansch phansch force-pushed the riir_update_lints_first_replace_region branch from a7fcf89 to 0318fdd Compare October 16, 2018 06:09
This allows the usage of `util/dev update_lints` which will write the
new lint_count to the `README.md`.
@phansch phansch force-pushed the riir_update_lints_first_replace_region branch from 0318fdd to 956987f Compare October 16, 2018 06:14
@phansch phansch added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Oct 16, 2018
f.write_all(replaced.as_bytes()).expect("Unable to write file");
// Ensure we write the changes with a trailing newline so that
// the file has the proper line endings.
f.write(b"\n").expect("Unable to write file");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dogfood is unhappy here and in a few (less relevant) places.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 16, 2018

⭐ ⭐ ⭐ ⭐ ⭐ documentation

would approve again

`expect_fun_call` causes a false-positive, so I disabled it for now.
@phansch phansch merged commit dae7abb into rust-lang:master Oct 16, 2018
@phansch phansch deleted the riir_update_lints_first_replace_region branch October 16, 2018 19:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants