Last active
November 4, 2020 19:05
-
-
Save shubhank-saxena/af6ae3793a15cf208d29b730a81f2112 to your computer and use it in GitHub Desktop.
This extracts all the error from output of checkpatch.pl
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
#!/bin/bash | |
git log v5.7..v5.8 --format=format:"%H" --no-merges &> ./hashes.txt | |
input="./hashes.txt" | |
while IFS= read -r line | |
do | |
err=$(./scripts/checkpatch.pl --git "$line" --mailback --terse --show-types) | |
type=$(echo $err| cut -d':' -f 3,4) | |
echo "$type" >> errors.txt | |
done < "$input" | |
rm ./hashes.txt | |
#This is for most frequent error | |
cat errors.txt | sort | uniq -c | sort -n | tail -n1 | |
#To list all the occuring errors | |
cat errors.txt | sort | uniq -c | sort | |
rm ./errors.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment