@@ -193,9 +193,9 @@ class TestSuppressions : public TestFixture {
193
193
errout.str (" " );
194
194
output.str (" " );
195
195
196
- std::list<std::pair<std::string, std::size_t >> files ;
196
+ std::list<std::pair<std::string, std::size_t >> filelist ;
197
197
for (std::map<std::string, std::string>::const_iterator i = f.cbegin (); i != f.cend (); ++i) {
198
- files .emplace_back (i->first , i->second .size ());
198
+ filelist .emplace_back (i->first , i->second .size ());
199
199
}
200
200
201
201
CppCheck cppCheck (*this , true , nullptr );
@@ -208,17 +208,18 @@ class TestSuppressions : public TestFixture {
208
208
if (!suppression.empty ()) {
209
209
EXPECT_EQ (" " , settings.nomsg .addSuppressionLine (suppression));
210
210
}
211
- // TODO: test with FS
212
- std::list<FileSettings> fileSettings;
213
- SingleExecutor executor (cppCheck, files, fileSettings, settings, settings.nomsg , *this );
211
+
214
212
std::vector<std::unique_ptr<ScopedFile>> scopedfiles;
215
- scopedfiles.reserve (files .size ());
213
+ scopedfiles.reserve (filelist .size ());
216
214
for (std::map<std::string, std::string>::const_iterator i = f.cbegin (); i != f.cend (); ++i)
217
215
scopedfiles.emplace_back (new ScopedFile (i->first , i->second ));
218
216
217
+ // TODO: test with FS
218
+ std::list<FileSettings> fileSettings;
219
+ SingleExecutor executor (cppCheck, filelist, fileSettings, settings, settings.nomsg , *this );
219
220
const unsigned int exitCode = executor.check ();
220
221
221
- CppCheckExecutor::reportSuppressions (settings, false , files , *this );
222
+ CppCheckExecutor::reportSuppressions (settings, false , filelist , *this );
222
223
223
224
return exitCode;
224
225
}
@@ -227,8 +228,8 @@ class TestSuppressions : public TestFixture {
227
228
errout.str (" " );
228
229
output.str (" " );
229
230
230
- std::list<std::pair<std::string, std::size_t >> files ;
231
- files .emplace_back (" test.cpp" , strlen (code));
231
+ std::list<std::pair<std::string, std::size_t >> filelist ;
232
+ filelist .emplace_back (" test.cpp" , strlen (code));
232
233
233
234
Settings settings;
234
235
settings.jobs = 2 ;
@@ -237,17 +238,18 @@ class TestSuppressions : public TestFixture {
237
238
if (!suppression.empty ()) {
238
239
EXPECT_EQ (" " , settings.nomsg .addSuppressionLine (suppression));
239
240
}
240
- // TODO: test with FS
241
- std::list<FileSettings> fileSettings;
242
- ThreadExecutor executor (files, fileSettings, settings, settings.nomsg , *this , CppCheckExecutor::executeCommand);
241
+
243
242
std::vector<std::unique_ptr<ScopedFile>> scopedfiles;
244
- scopedfiles.reserve (files .size ());
245
- for (std::list<std::pair<std::string, std::size_t >>::const_iterator i = files .cbegin (); i != files .cend (); ++i)
243
+ scopedfiles.reserve (filelist .size ());
244
+ for (std::list<std::pair<std::string, std::size_t >>::const_iterator i = filelist .cbegin (); i != filelist .cend (); ++i)
246
245
scopedfiles.emplace_back (new ScopedFile (i->first , code));
247
246
247
+ // TODO: test with FS
248
+ std::list<FileSettings> fileSettings;
249
+ ThreadExecutor executor (filelist, fileSettings, settings, settings.nomsg , *this , CppCheckExecutor::executeCommand);
248
250
const unsigned int exitCode = executor.check ();
249
251
250
- CppCheckExecutor::reportSuppressions (settings, false , files , *this );
252
+ CppCheckExecutor::reportSuppressions (settings, false , filelist , *this );
251
253
252
254
return exitCode;
253
255
}
@@ -257,8 +259,8 @@ class TestSuppressions : public TestFixture {
257
259
errout.str (" " );
258
260
output.str (" " );
259
261
260
- std::list<std::pair<std::string, std::size_t >> files ;
261
- files .emplace_back (" test.cpp" , strlen (code));
262
+ std::list<std::pair<std::string, std::size_t >> filelist ;
263
+ filelist .emplace_back (" test.cpp" , strlen (code));
262
264
263
265
Settings settings;
264
266
settings.jobs = 2 ;
@@ -267,17 +269,18 @@ class TestSuppressions : public TestFixture {
267
269
if (!suppression.empty ()) {
268
270
EXPECT_EQ (" " , settings.nomsg .addSuppressionLine (suppression));
269
271
}
270
- // TODO: test with FS
271
- std::list<FileSettings> fileSettings;
272
- ProcessExecutor executor (files, fileSettings, settings, settings.nomsg , *this , CppCheckExecutor::executeCommand);
272
+
273
273
std::vector<std::unique_ptr<ScopedFile>> scopedfiles;
274
- scopedfiles.reserve (files .size ());
275
- for (std::list<std::pair<std::string, std::size_t >>::const_iterator i = files .cbegin (); i != files .cend (); ++i)
274
+ scopedfiles.reserve (filelist .size ());
275
+ for (std::list<std::pair<std::string, std::size_t >>::const_iterator i = filelist .cbegin (); i != filelist .cend (); ++i)
276
276
scopedfiles.emplace_back (new ScopedFile (i->first , code));
277
277
278
+ // TODO: test with FS
279
+ std::list<FileSettings> fileSettings;
280
+ ProcessExecutor executor (filelist, fileSettings, settings, settings.nomsg , *this , CppCheckExecutor::executeCommand);
278
281
const unsigned int exitCode = executor.check ();
279
282
280
- CppCheckExecutor::reportSuppressions (settings, false , files , *this );
283
+ CppCheckExecutor::reportSuppressions (settings, false , filelist , *this );
281
284
282
285
return exitCode;
283
286
}
0 commit comments