Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AtomLinter/linter-clang
Lint C-based files using Clang.
https://github.com/AtomLinter/linter-clang
Last synced: about 2 months ago
JSON representation
Lint C-based files using Clang.
- Host: GitHub
- URL: https://github.com/AtomLinter/linter-clang
- Owner: AtomLinter
- Archived: true
- Created: 2014-06-19T15:36:21.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-07-28T19:10:11.000Z (11 months ago)
- Last Synced: 2024-04-14T23:57:08.064Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 298 KB
- Stars: 55
- Watchers: 8
- Forks: 29
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Lists
- awesome-c - linter-clang - Lint C code in Atom, using Clang. [`MIT`](https://raw.githubusercontent.com/atom/atom/master/LICENSE.md) (Text Editor Extensions ## / Atom ###)
README
# linter-clang
[![Travis.ci Shield](https://img.shields.io/travis/AtomLinter/linter-clang/master.svg?style=flat-square&label=linux)](https://travis-ci.org/AtomLinter/linter-clang)
[![Travis.ci Shield](https://img.shields.io/travis/AtomLinter/linter-clang/master.svg?style=flat-square&label=os%20x)](https://travis-ci.org/AtomLinter/linter-clang)
[![AppVeyor Sheild](https://img.shields.io/appveyor/ci/AtomLinter/linter-clang/master.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/kepler0/linter-clang)This linter plugin for [Linter](https://github.com/AtomLinter/Linter) provides an interface to clang. It will be used with files that have the "C++", "C", "Objective-C" and "Objective-C++" syntax.
### Plugin installation
Install from the Settings pane of Atom by searching for and installing the `linter-clang` package.Or install from your Command Prompt by running:
```
$ apm install linter-clang
```This package will ensure that all dependencies are installed on activation.
## Project-specific settings
### .clang_complete
If your project has some extra include directories, put them in a file called ".clang_complete" and list them line by line.
The linter will open the file and use the specified paths when linting in your project.```
-Iinclude
-Ilib/foo/include
```
Please note the file should contain one command line argument per line.
These arguments are passed to clang directly using exec and not via a shell.
Therefore any spaces are treated as a part of the command line argument.This means on the one hand `-I include` results in clang using ` include` (note the space at the beginning) as include directory.
For the same reason `-I include -I lib/foo/include` causes clang to search for includes in ` include -I lib/foo/include`.On the other hand if your path contains spaces you must not escape them or put quotes around the path.
For example: `-Ilib/dir with spaces/include` only works without any quotes or escaping.### Clang JSON Compilation Database
The [Clang JSON Compilation Database](http://clang.llvm.org/docs/JSONCompilationDatabase.html) is also a supported format for project specific settings.