Created
April 14, 2015 06:44
-
-
Save michaelsproul/0c926b1458baef5254d5 to your computer and use it in GitHub Desktop.
Rust Unexplained Error Finder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run from within src | |
import subprocess | |
for err_no in range(500): | |
err_string = "E%04d" % err_no | |
# Determine if the error needs a message. | |
try: | |
subprocess.check_output(["git", "grep", err_string + ",", "librustc/diagnostics.rs"]) | |
except Exception: | |
continue | |
# Print its location. | |
location_line = subprocess.check_output(["git", "grep", err_string + ","]).splitlines()[-1].decode() | |
location = location_line[0 : location_line.find(": ")] | |
print("- [ ] {} in {}".format(err_string, location)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment