GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cpp-linter/homebrew-tap: Homebrew tap for clang-tools-static-binaries — clang-format, clang-tidy, clang-query, clang-apply-replacements, clang-include-cleaner

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Formula
Formula
 
 
scripts
scripts
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

homebrew-tap

ci part of cpp-linter

This Homebrew tap installs clang-format, clang-tidy and other LLVM tools on macOS from pre-built static binaries, without building LLVM.

Website · Get started · Discussions

Quick start

brew install cpp-linter/tap/clang-format@21

Install with the full cpp-linter/tap/<formula> name. Homebrew adds the tap and trusts the formula you named, so no other step is needed.

Important

Short names such as brew install clang-tidy need brew tap cpp-linter/tap and brew trust cpp-linter/tap first: since Homebrew 6, formulae from third-party taps are not loaded until they are trusted. clang-format is also a Homebrew core formula, so brew install clang-format installs that one instead of this tap's. Write cpp-linter/tap/clang-format.

Usage

All 9 tools are bundled in the clang-tools formula, or can be installed individually:

brew install cpp-linter/tap/clang-tools               # all 9 tools below
brew install cpp-linter/tap/clang-format              # code formatter
brew install cpp-linter/tap/clang-tidy                # linter / static analyzer
brew install cpp-linter/tap/clang-query               # AST query tool
brew install cpp-linter/tap/clang-apply-replacements  # apply clang-tidy fixes
brew install cpp-linter/tap/clang-include-cleaner     # remove unused headers
brew install cpp-linter/tap/clang-scan-deps           # dependency scanner for modules
brew install cpp-linter/tap/llvm-cov                  # code coverage reporting
brew install cpp-linter/tap/llvm-profdata             # profile data tool
brew install cpp-linter/tap/llvm-symbolizer           # symbolizer for sanitizers / logs

Append @<version> for a specific LLVM version, for example cpp-linter/tap/clang-tools@21.

Tools that parse code

clang-tidy, clang-query and clang-include-cleaner read your code the way the compiler does, so they need two more things than the other tools:

  • clang's builtin headers (stddef.h, stdarg.h, ...). The formulae install them next to the tool, in the place where clang looks for them.
  • The macOS SDK, which holds the C and C++ standard headers. Apple's clang finds it by itself; clang built from upstream LLVM does not. The formulae install a small script as clang-tidy (and the other two) that sets SDKROOT to the output of xcrun --show-sdk-path and then runs the tool. An SDKROOT that you set yourself is kept.

The SDK belongs to the Xcode version on your Mac, and an old LLVM version cannot always parse the C++ headers of a new SDK. If clang-tidy@19 reports errors inside the SDK's own headers, use a newer LLVM version.

Updating

brew update
brew upgrade cpp-linter/tap/clang-tools

To update a single tool:

brew upgrade cpp-linter/tap/clang-format

A formula without @<version> moves to the next LLVM major version when this tap adds one, so brew upgrade can change its major version. @<version> formulae stay on theirs.

Supported versions

The formulae cover LLVM 19 to 23, for macOS only. Formulae without a version suffix install LLVM 23; @22, @21, @20 and @19 install those versions.

Each formula downloads the pre-built static binaries from the cpp-linter/clang-tools-static-binaries GitHub Releases matching your macOS architecture (ARM64 or x86_64).

The SHA-256 checksums are verified during installation.

Limitations

Every formula installs its tools under their plain names, such as clang-format, and Homebrew links only one formula's clang-format into its bin directory. If another formula already links it (another @<version>, clang-tools, or Homebrew core's clang-format), the new one is installed but not linked. Switch with brew unlink on the other formula and brew link on this one, or run the one that is not linked by its full path:

"$(brew --prefix cpp-linter/tap/clang-format@21)/bin/clang-format" --version

cpp-linter/tap/clang-format and Homebrew core's clang-format cannot be installed at the same time, because they have the same name.

Maintaining this tap

The Update Formula workflow runs daily and opens a pull request when the clang-tools-static-binaries index changes the formulae. The index lists one release per LLVM version, so each formula points at its own version's release. To update them by hand:

bash scripts/update-formula.sh

This will regenerate all Formula/*.rb files (both bundle and individual tool formulae) with the correct URLs and SHA-256 checksums, after checking each binary against the SHA-512 in the index.

Every LLVM version in the index from MIN_VERSION in scripts/update-formula.py up gets a formula, and the newest one gets the unversioned name. The script never deletes formulae, so remove the files of a version that leaves the index.

Contributing

See the contributing guide and report problems in issues.

License

The formulae and scripts in this repository are released under the MIT License. The tools they install are built from LLVM, which is under the Apache License v2.0 with LLVM Exceptions.

About

Homebrew tap for clang-tools-static-binaries — clang-format, clang-tidy, clang-query, clang-apply-replacements, clang-include-cleaner

github.com/cpp-linter/clang-tools-static-binaries

Topics

clang-apply-replacementsclang-formatclang-include-cleanerclang-queryclang-tidyllvm-covllvm-profdatallvm-symbolizer

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.