This linter plugin for Linter provides an interface to clang. It will be used with files that have the "C++", "C", "Objective-C" and "Objective-C++" syntax.
Press ctrl and ',' or cmd and ',' , click on 'Packages', search 'linter clang', or:
$ apm install linter-clang
If your project has some extra include directories, put them in a file called ".linter-clang-includes" and list them line by line. The linter will open the file and use the specified paths when linting in your project.
You can put your ".linter-clang-includes" files in subdirectories, too, the linter will find them and include the paths relative to the file they are specified in.
If your project has some extra compiler flags, put them in a file called ".linter-clang-flags" and list all flags. The linter will open the file and use the specified flags when linting in your project. You can put your flag file in subdirectories, too, however, no resolving of paths will take place. For that, you can use macros (see below).
Note: Whenever there is a space in the flag file it will separate the strings before and after when passing them as arguments to the compiler (like in the command line). If you have a filename with a space, put it into quotes. Everything between quotes won't be separated. The quotes will be removed after parsing. Using quotes is therefore not supported yet (TODO: let the user put a backslash to escape the quote).
The linter will expand the following macros in your ".linter-clang-includes" and ".linter-clang-flags" files:
%d
-> the directory of the file being linted%p
-> the project path%%
->%
If you would like to contribute enhancements or fixes, please do the following:
- Fork the plugin repository.
- Hack on a separate topic branch created from the latest
master
. - Commit and push the topic branch.
- Make a pull request.
- welcome to the club
Please note that modifications should follow these coding guidelines:
- Indent is 2 spaces.
- Code should pass coffeelint linter.
- Vertical whitespace helps readability, don’t be afraid to use it.
Thank you for helping out!
- linter-php, for PHP using
php -l
- linter-phpcs, for PHP, using
phpc
- linter-phpmd, for PHP, using
phpmd
- linter-pylint, for Python, using
pylint
- linter-javac, for Java, using
javac
- linter-jshint, for JavaScript and JSON, using
jshint
- linter-jscs, for JavaScript, using
jscs
- linter-scss-lint, for SASS/SCSS, using
scss-lint
- linter-coffeelint, for CoffeeScript, using
coffeelint
- linter-csslint, for CSS, using
csslint
- linter-rubocop, for Ruby, using
rubocop
- linter-tslint, for Typescript, using
tslint
- linter-xmllint, for XML, using
xmllint
- linter-shellcheck, for Bash, using
shellcheck
- linter-scalac, for Scala, using
scalac
Check out AtomLinter!