Skip to content

notes are shown in wrong order #4

@danmar

Description

@danmar

Example code:

void foo(int x) {
    if (x==0) {}
    x = 100 / x;
}

Example output from Cppcheck:

src/checkcommon.cpp:13:13: warning: Either the condition 'x==0' is redundant or there is division by zero at line 13. [zerodivcond]
    x = 100 / x;
            ^
src/checkcommon.cpp:12:10: note: Assuming that condition 'x==0' is not redundant
    if (x==0) {}
         ^
src/checkcommon.cpp:13:13: note: Division by zero
    x = 100 / x;
            ^

In vscode the notes are reordered:

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions