@@ -185,20 +185,13 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
185185
186186 // exitcode-suppressions filename.txt
187187 if (std::strcmp (argv[i], " --exitcode-suppressions" ) == 0 ) {
188- // This is deprecated and will be removed soon
189- PrintMessage (" cppcheck: '--exitcode-suppressions <file>' is deprecated, use '--exitcode-suppressions=<file>' instead." );
190-
191- ++i;
192- if (i >= argc || argv[i][0 ] == ' -' ) {
193- PrintMessage (" cppcheck: No filename specified for the '--exitcode-suppressions' option." );
194- return false ;
195- }
196- filename = argv[i];
188+ // Error message to be removed in 1.72
189+ PrintMessage (" cppcheck: '--exitcode-suppressions <file>' has been removed, use '--exitcode-suppressions=<file>' instead." );
190+ return false ;
197191 }
192+
198193 // exitcode-suppressions=filename.txt
199- else {
200- filename = 24 + argv[i];
201- }
194+ filename = 24 + argv[i];
202195
203196 std::ifstream f (filename.c_str ());
204197 if (!f.is_open ()) {
@@ -240,29 +233,9 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
240233 }
241234
242235 else if (std::strcmp (argv[i], " --suppressions" ) == 0 ) {
243- // This is deprecated and will be removed soon
244- PrintMessage (" cppcheck: '--suppressions' is deprecated, use '--suppressions-list' instead." );
245-
246- ++i;
247-
248- if (i >= argc) {
249- PrintMessage (" cppcheck: No file specified for the '--suppressions' option." );
250- return false ;
251- }
252-
253- std::ifstream f (argv[i]);
254- if (!f.is_open ()) {
255- std::string message (" cppcheck: Couldn't open the file: \" " );
256- message += std::string (argv[i]);
257- message += " \" ." ;
258- PrintMessage (message);
259- return false ;
260- }
261- const std::string errmsg (_settings->nomsg .parseFile (f));
262- if (!errmsg.empty ()) {
263- PrintMessage (errmsg);
264- return false ;
265- }
236+ // Error message to be removed in 1.72
237+ PrintMessage (" cppcheck: '--suppressions' has been removed, use '--suppressions-list=<file>' instead." );
238+ return false ;
266239 }
267240
268241 else if (std::strncmp (argv[i], " --suppress=" , 11 ) == 0 ) {
0 commit comments