Skip to content

Instantly share code, notes, and snippets.

@kristopherjohnson
Last active November 13, 2024 15:39
Show Gist options
  • Save kristopherjohnson/bcc4a336d68032c9a98922f85fd95102 to your computer and use it in GitHub Desktop.
Save kristopherjohnson/bcc4a336d68032c9a98922f85fd95102 to your computer and use it in GitHub Desktop.
bash/zsh alias for running clang-tidy from Homebrew llvm formula
if type brew &>/dev/null; then
if brew list llvm &>/dev/null; then
alias clang-tidy="$(ls -1 $(brew --cellar llvm) | sort -V | tail -n 1 | xargs -I {} echo $(brew --cellar llvm)/{}/bin/clang-tidy)"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment