Permalink
Browse files

Add support for .clang_complete files.

  • Loading branch information...
promethe42 committed Jul 30, 2015
1 parent 3794a41 commit 69106d9e3c16c973f28c47d3d07a292abb3dc973
Showing with 13 additions and 1 deletion.
  1. +9 −0 lib/linter-clang.coffee
  2. +4 −1 package.json
@@ -3,6 +3,7 @@ linterPath = atom.packages.getLoadedPackage("linter").path
Linter = require "#{linterPath}/lib/linter"
path = require 'path'
fs = require 'fs'
ClangFlags = require 'clang-flags'

class LinterClang extends Linter
# The syntax that the linter handles. May be a string or
@@ -139,6 +140,14 @@ class LinterClang extends Linter

searchDirectory projectPath

try
clangflags = ClangFlags.getClangFlags(@cwd)
console.log "linter-clang: found .clang_complete file" if atom.inDevMode()
console.log clangflags if atom.inDevMode() and verbose
args = args.concat clangflags if clangflags
catch error
console.log "linter-clang: " + error if atom.inDevMode()

# Add file path as last argument
args.push filePath

@@ -11,5 +11,8 @@
"license": "MIT",
"engines": {
"atom": ">0.50.0"
}
},
"dependencies": {
"clang-flags": "0.2.2"
},
}

0 comments on commit 69106d9

Please sign in to comment.