johnthagen / johnthagen/clion-cppcheck

persistent line of `syntaxError` even after modification

Open
#107 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
35
Forks
6
PR merge metrics
No merged PRs in 30d

Description

```cpp
fi if;
//
```
(The empty line is intentional or it will be shown as a global error)

```
scratch_3.cpp:1:4: error: syntax error [syntaxError]
fi if;
^
```

![Image](https://github.com/user-attachments/assets/c3354473-57ce-4841-890a-2ba4f41f1d08)

---

Insert a leading empty line.

```cpp
//
fi if;
//
```

```
scratch_3.cpp:2:4: error: syntax error [syntaxError]
fi if;
^
```

![Image](https://github.com/user-attachments/assets/063d1bc2-0e7b-47c9-b562-9c2c1ae66224)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.