clion-cppcheck icon indicating copy to clipboard operation
clion-cppcheck copied to clipboard

persistent line of `syntaxError` even after modification

Open firewave opened this issue 9 months ago • 2 comments

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


Insert a leading empty line.

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

Image

firewave avatar Mar 16 '25 11:03 firewave

A way to fix this is to CTRL+A, CTRL+X, CTRL+V the contents of the file.

Possibly related to #105.

firewave avatar Mar 16 '25 11:03 firewave

Cppcheck is being invoked and the raw results show the correct location:

        <error id="syntaxError" severity="error" msg="syntax error" verbose="syntax error" file0="/tmp/3ryvKpXz_scratch_3.cpp">
            <location file="/tmp/3ryvKpXz_scratch_3.cpp" line="2" column="4"/>
        </error>

Switching to a different IDE tab and back will also fix it but it also (unnecessarily) triggers Cppcheck again.

firewave avatar Mar 16 '25 11:03 firewave