We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-f
1 parent 6cc4f53 commit eb18d11Copy full SHA for eb18d11
main.cpp
@@ -18,6 +18,7 @@ int main(int argc, char **argv)
18
bool error = false;
19
const char *filename = nullptr;
20
bool use_istream = false;
21
+ bool fail_on_error = false;
22
23
// Settings..
24
simplecpp::DUI dui;
@@ -70,6 +71,10 @@ int main(int argc, char **argv)
70
71
error_only = true;
72
found = true;
73
break;
74
+ case 'f':
75
+ fail_on_error = true;
76
+ found = true;
77
+ break;
78
}
79
if (!found) {
80
std::cout << "error: option '" << arg << "' is unknown." << std::endl;
@@ -172,5 +177,8 @@ int main(int argc, char **argv)
172
177
173
178
174
179
180
+ if (fail_on_error && !outputList.empty())
181
+ return 1;
182
+
175
183
return 0;
176
184
0 commit comments