Skip to content

Commit

Permalink
Add clippy ascii art
Browse files Browse the repository at this point in the history
shoutout to who/jibbl for suggesting, and to who/tzn for appropiately prioritizing this

Change-Id: Ia0c2efb7337723d8a81ab4cf532c174133af7f3a
  • Loading branch information
jul-sh committed Jul 30, 2024
1 parent daeeb06 commit 5de4e07
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions scripts/clippy_clean
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,36 @@ COMMAND="bazel build --config=clippy --config=unsafe-fast-presubmit //...:all --

# Run the command and filter the output
$COMMAND 2>&1 | awk '
BEGIN {
line_count = 0
print " /‾‾\\"
print " ▏ ▕"
print " (o) (o)"
print " ▏▏ ▕ /"
print " ▏▏ ▕▕"
print " ▏\\_/▕"
print " \\___/"
print " /\\"
print "/‾‾‾‾ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾\\"
}
{
# Filter out lines starting with "Aspect @rules_rust//rust/private:clippy" and ending with "up-to-date:" or "(nothing to build)"
/^Aspect @rules_rust\/\/rust\/private:clippy.*(up-to-date:|\(nothing to build\))$/ {next}
if ($0 ~ /^Aspect @rules_rust\/\/rust\/private:clippy.*(up-to-date:|\(nothing to build\))$/) next
# Filter out lines indicating successful clippy checks
/^ *bazel-.*\.clippy\.ok$/ {next}
if ($0 ~ /^ *bazel-.*\.clippy\.ok$/) next
# Filter out INFO lines
/^\([0-9:]+\) INFO:/ {next}
if ($0 ~ /^\([0-9:]+\) INFO:/) next
# Print any other lines that dont match the above patterns
{print}
print $0
line_count++
}
END {
if (line_count == 0) {
print " no issues found, have a wonderful day."
}
print "\\________________________________________________________/"
}
'

0 comments on commit 5de4e07

Please sign in to comment.