Socket
Socket
Sign inDemoInstall

clang-format

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clang-format

node wrapper around clang-format


Version published
Weekly downloads
89K
increased by6.49%
Maintainers
2
Weekly downloads
 
Created
Source

clang-format

node.js module which wraps the native clang-format executable.

From the command-line:

$ npm install -g clang-format
$ clang-format -help

If your platform isn't yet supported, you can create the native binary from the latest upstream clang sources, make sure it is stripped and optimized (should be about 1.4MB as of mid-2015) and send a pull request to add it.

Globbing files

$ clang-format --glob=folder/**/*.js

This will run clang-format once per file result, and show the total formatted files at the end. See node-glob for globbing semantics.

Compiling clang-format

For Linux, compile a statically linked MinSizeRel build:

cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DLLVM_BUILD_STATIC=true ..
ninja clang-format

For Mac OS X, static linking is not required.

Windows

Windows snapshot builds to include in the release can be found at the LLVM website.

Configure with:

cmake -G "Visual Studio 12" -DCMAKE_BUILD_TYPE=MinSizeRel ..

In the generated Visual Studio project, search for the clang-format binary in the Solution Explorer window, right click and choose Build.

FAQs

Package last updated on 07 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc