SublimeLinter / SublimeLinter-gcc

This linter plugin for SublimeLinter provides an interface to gcc or other gcc-like (cross-)compiler.
MIT License
22 stars 5 forks source link

Linter says `(erred)` after version SL v4.3 #12

Closed mfsimon closed 6 years ago

mfsimon commented 6 years ago

I'm getting the following error with SL-gcc v1.3.8, SL v4.3.1, macOS 10.13.4:

Linter crashed.

Traceback (most recent call last):
  File "/Users/mfsimon/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package/lint/backend.py", line 87, in execute_lint_task
    errors = linter.lint(code, view_has_changed, settings) or []
  File "/Users/mfsimon/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package/lint/linter.py", line 713, in lint
    cmd = self.get_cmd()
  File "/Users/mfsimon/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter.sublime-package/lint/linter.py", line 496, in get_cmd
    cmd = cmd()
  File "/Users/mfsimon/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter-gcc.sublime-package/linter.py", line 134, in cmd
    settings = self.get_syntax_specific_settings(c_or_cpp)
  File "/Users/mfsimon/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter-gcc.sublime-package/linter.py", line 166, in get_syntax_specific_settings
    settings['include_dirs'].append(os.path.dirname(file_path))
KeyError: 'include_dirs'

I'm using clang with setting: "c++_executable": "clang++"

jfcherng commented 6 years ago

Thanks! Should be fixed by https://github.com/SublimeLinter/SublimeLinter-gcc/commit/cdc04226db81133f5838925d2204c10bc92b2014 in 1.3.9.