New issue

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

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

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Oct 16, 2018

Conversation

Projects
None yet
2 participants
@phansch
Collaborator

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

Rename `active_lints` to `usable_lints`
Because now `usable_lints` will also exclude internal lints.

@phansch phansch force-pushed the phansch:riir_update_lints_first_replace_region branch from a7fcf89 to 0318fdd Oct 16, 2018

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`.

@phansch phansch force-pushed the phansch:riir_update_lints_first_replace_region branch from 0318fdd to 956987f 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");

This comment has been minimized.

@oli-obk

oli-obk Oct 16, 2018

Collaborator

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

@oli-obk

This comment has been minimized.

Collaborator

oli-obk commented Oct 16, 2018

⭐️ ⭐️ ⭐️ ⭐️ ⭐️ documentation

would approve again

Fix dogfood
`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

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@phansch phansch deleted the phansch:riir_update_lints_first_replace_region branch Oct 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment