1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
#include <cstdio>

#include <some_module/feature.h><--- Found C system header after C++ system header. Should be: main.h, c system, c++ system, other.  
#include <another_module/Widget.h><--- Found C system header after C++ system header. Should be: main.h, c system, c++ system, other.  

// Omit <string> inclusion for cpplint test

int main(int argc, char** argv) {

	std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;
	std::cout << "~------Project template main!-------~" << std::endl;
	std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl;

	// Making sure other classes are being linked properly
	some_module::Feature feature;
	const std::string testString = feature.toString();<--- Add #include <string> for string  
	std::cout << testString << std::endl;

	Widget widget;
	const int testMeaning = widget.life(69);
	std::cout << testMeaning << std::endl;

	// Checking for C++11
	void* ptr = nullptr;
	((void)ptr);

	// Generating some bad code for cpplint and cppcheck
	char* kyop = "W O L O L O L O";
	printf(kyop);<--- Potential format string bug. Do printf("%s", kyop) instead.  
	printf("\n");
	int x;
	for(int i = 0; i != 10; i++){
		x = (i%2) + (i*3) - i;
	}

	return 0;
}