Test Sublime Linter - cppcheck

Warning

The following steps assume that you strictly followed the set up Cppcheck for Sublime Text and the minimal set up for Sublime Linter - cppcheck sections.

Create a testing file

  • Open Sublime Text
  • Create a new file called test.cpp
  • Copy Paste the following lines inside the test.cpp file
#include <iostream>

using namespace std;

int main()
{
    cout << "it works" << endl;

    return 0;

Warning

This chunk of code contains voluntarily an error.

A } must be added after return 0; if you want your program to work correctly.

But this is not what you need to test Sublime Linter - ccpcheck.

If the set up of Sublime Linter - cppcheck is correct

  • You must see

    • before the line numbers
    • at line 6
    • A huge white dot

Note

This huge white dot notice you that Sublime Linter - cppcheck detects an error to this specific line.

If your set up is correct and you correct the error by adding a } after the return 0;, this huge white dot must disappear.