dense-analysis / dense-analysis/ale

Errors for other files are not handled for clangcheck

Open
#1,328 9 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

## Information
IMHO lines with errors and warning were not marked due to incorrect ../../ path handle.

**VIM version**
NVIM v0.2.3-564-g6452831

Operating System: Red Hat Enterprise Linux Server release 6.5 (Santiago)

### :ALEInfo

```
Current Filetype: cpp
Available Linters: ['clang', 'clangcheck', 'clangtidy', 'cppcheck', 'cpplint', 'g++']
Enabled Linters: ['clangcheck']
Linter Variables:

let g:ale_cpp_clangcheck_executable = '/opt/llvm/x86_64/3.8.0/bin/clang-check'
let g:ale_cpp_clangcheck_options = ''
Global Variables:

let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 0
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_linter_aliases = {}
let g:ale_linters = {'cpp': ['clangcheck']}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:

(executable check - success) /opt/llvm/x86_64/3.8.0/bin/clang-check
(finished - exit code 1) ['/bin/bash', '-c', '''/opt/llvm/x86_64/3.8.0/bin/clang-check'' ''/home/user/src/main.cpp'' -p ''/home/user/compile_commands.json''']

<<>>
../src/main.cpp.:13:2: error: invalid preprocessing directive
#iinclude
^
1 error generated.
Error while processing ../src/main.cpp.
<<>>
```

## What went wrong
Line with error was not marked

## Reproducing the bug
init.vim
```
let g:ale_linters = {
\ 'cpp': ['clangcheck'],
\}

let g:ale_lint_on_text_changed = 'never'
let g:ale_cpp_clangcheck_executable = '/opt/llvm/x86_64/3.8.0/bin/clang-check'
let g:ale_cpp_clangcheck_options=''
let g:ale_c_build_dir='path/to/dir'
```
Steps for repeating the bug:

1.Open file.
2.Lead to the error in a code.
2.Save it.
3.ALEInfo shows where is error, but line was not pointed out. ;(

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.