Commit c27e5d4
simplecpp.cpp: Issue error when an explicitly included file is not found (cppcheck-opensource#184)
* simplecpp.cpp: Issue error when an explicitly included file is not found
If a file is explicitly included for example via command line option
`-include=` but can not be opened this error message is issued now.
Example:
$ ./simplecpp -include=blah.h foo.c
int main ( )
{
return 0 ;
}
foo.c:1: missing header: Can not open include file 'blah.h' that is explicitly included for all files.
Fixes cppcheck-opensource#183
* Change `error.type` from `MISSING_HEADER` header to `ERROR`
`MISSING_HEADER` is only meant as an information to the user, nothing
really relevant while this issue reveals a problem with the command
line options that should get fixed.
* simplecpp.cpp: Fix error message
* Add new output error type EXPLICIT_INCLUDE_NOT_FOUND1 parent 71adfce commit c27e5d4
4 files changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2426 | 2426 | | |
2427 | 2427 | | |
2428 | 2428 | | |
2429 | | - | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
2430 | 2437 | | |
| 2438 | + | |
2431 | 2439 | | |
2432 | 2440 | | |
2433 | 2441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
0 commit comments