# clang-tools-wrapper

> Clang extra tools javascript wrapper

Latest version **1.0.11** (published 2021-04-05) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install clang-tools-wrapper
pnpm add clang-tools-wrapper
yarn add clang-tools-wrapper
bun add clang-tools-wrapper
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2021-04-05 |
| First published | 2021-04-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 2 |
| Author | edelwud |
| Maintainers | edelwud |
| Keywords | clang, clang-tools-extra |

## Links

- npm: https://www.npmjs.com/package/clang-tools-wrapper
- Repository: https://github.com/edelwud/clang-tools-wrapper
- Homepage: https://github.com/edelwud/clang-tools-wrapper#readme
- Issues: https://github.com/edelwud/clang-tools-wrapper/issues
- npm.io page: https://npm.io/package/clang-tools-wrapper

## Recent versions

- 1.0.11 (latest) — 2021-04-05
- 1.0.8 — 2021-04-05
- 1.0.7 — 2021-04-04
- 1.0.6 — 2021-04-04
- 1.0.5 — 2021-04-04
- 1.0.4 — 2021-04-04
- 1.0.3 — 2021-04-04
- 1.0.2 — 2021-04-04
- 1.0.1 — 2021-04-04

## README

# Clang Tools Wrapper

## Installation

`npm i clang-tools-wrapper`

## Description

Wrapper `clang-tools-extra` package for JavaScript

### Clang Format

Utility for formatting C/C++, JavaScript, TypeScript code

| Platform | Architecture | Status        |
| -------- | :----------: | ------------- |
| Windows  |     x32      | **Completed** |
| Windows  |     x64      | **Completed** |
| Linux    |     x32      | **Completed** |
| Linux    |     x64      | **Completed** |
| MacOs    |     x32      | **Completed** |
| MacOs    |     x64      | **Completed** |

### Clang Query

Utility for inspecting the Clang AST and assist in the construction of AST Matcher expressions.

| Platform | Architecture | Status        |
| -------- | :----------: | ------------- |
| Windows  |     x32      | _In progress_ |
| Windows  |     x64      | _In progress_ |
| Linux    |     x32      | _In progress_ |
| Linux    |     x64      | _In progress_ |
| MacOs    |     x32      | _In progress_ |
| MacOs    |     x64      | _In progress_ |

### Clang Tidy

Utility for static analysis of source code and recognition of program bottlenecks

| Platform | Architecture | Status        |
| -------- | :----------: | ------------- |
| Windows  |     x32      | _In progress_ |
| Windows  |     x64      | _In progress_ |
| Linux    |     x32      | _In progress_ |
| Linux    |     x64      | _In progress_ |
| MacOs    |     x32      | _In progress_ |
| MacOs    |     x64      | _In progress_ |

## Usage

Examples of usage `clang-tools-wrapper` library

### Clang Format

```javascript
const { ClangFormat, options, environment } = require('clang-tools-wrapper')

const { join } = require('path')
const fs = require('fs')

const filedir = join(process.cwd(), 'tests')
const filepath = join(filedir, 'sample.cpp')
const content = fs.readFileSync(filepath)

const editorConfig = options.generateEditorConfig(filepath, 0, 'LLVM', 'Google')
const execConfig = options.generateExecConfig(content, filedir)

const clangFormat = new ClangFormat(environment)

console.log(clangFormat.format(editorConfig, execConfig))
```

---
_Source: https://npm.io/package/clang-tools-wrapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
