Last active
January 14, 2024 04:01
-
-
Save ttaylorr/e0a645d2c7af665bea0bdb0ba7e00e89 to your computer and use it in GitHub Desktop.
count -Wunused-parameter warnings
This file contains 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
git rev-list origin/master | perl -ne 'print if $. % 10 == 0' | | |
while read rev | |
do | |
git checkout -q $rev && | |
nr="$(make -Bks CFLAGS='-Wno-all -Wunused-parameter -fdiagnostics-format=json' \ | |
git 2>&1 | grep '^\[' | jq -s 'flatten | length')" && | |
printf "%s %s\n" $(git log -1 --format="%cd" --date=unix $rev) "$nr" || return 1 | |
done |
This file contains 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
#!/usr/bin/env python3 | |
from datetime import datetime | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as mdates | |
import fileinput | |
if __name__ == "__main__": | |
timestamps, values = zip(*[line.split() for line in fileinput.input()]) | |
timestamps = [datetime.fromtimestamp(int(ts)) for ts in timestamps] | |
values = [int(val) for val in values] | |
plt.plot(timestamps, values) | |
plt.ylabel("# -Wunused-parameter warnings") | |
plt.title("# -Wunused-parameter warnings over time") | |
plt.gcf().autofmt_xdate() | |
plt.grid(True) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment