@@ -424,6 +424,9 @@ static std::string detectPython(const CppCheck::ExecuteCmdFn &executeCommand)
424424 return " " ;
425425}
426426
427+ /* *
428+ * @throws InternalError thrown when Python execution failed
429+ */
427430static std::vector<picojson::value> executeAddon (const AddonInfo &addonInfo,
428431 const std::string &defaultPythonExe,
429432 const std::string &file,
@@ -1167,32 +1170,32 @@ unsigned int CppCheck::checkInternal(const FileWithDetails& file, const std::str
11671170 hasValidConfig = true ;
11681171
11691172 Tokenizer tokenizer (std::move (tokenlist), mErrorLogger );
1170- try {
1171- if (mSettings .showtime != ShowTime::NONE)
1172- tokenizer.setTimerResults (&s_timerResults);
1173- tokenizer.setDirectives (directives); // TODO: how to avoid repeated copies?
1173+ if (mSettings .showtime != ShowTime::NONE)
1174+ tokenizer.setTimerResults (&s_timerResults);
1175+ tokenizer.setDirectives (directives); // TODO: how to avoid repeated copies?
11741176
1175- // locations macros
1176- mLogger ->setLocationMacros (tokenizer.tokens (), files);
1177+ // locations macros
1178+ mLogger ->setLocationMacros (tokenizer.tokens (), files);
11771179
1178- // If only errors are printed, print filename after the check
1179- if (!mSettings .quiet && (!currentConfig.empty () || checkCount > 1 )) {
1180- std::string fixedpath = Path::toNativeSeparators (file.spath ());
1181- mErrorLogger .reportOut (" Checking " + fixedpath + " : " + currentConfig + " ..." , Color::FgGreen);
1182- }
1180+ // If only errors are printed, print filename after the check
1181+ if (!mSettings .quiet && (!currentConfig.empty () || checkCount > 1 )) {
1182+ std::string fixedpath = Path::toNativeSeparators (file.spath ());
1183+ mErrorLogger .reportOut (" Checking " + fixedpath + " : " + currentConfig + " ..." , Color::FgGreen);
1184+ }
11831185
1184- if (!tokenizer.tokens ())
1185- continue ;
1186+ if (!tokenizer.tokens ())
1187+ continue ;
11861188
1187- // skip rest of iteration if just checking configuration
1188- if (mSettings .checkConfiguration )
1189- continue ;
1189+ // skip rest of iteration if just checking configuration
1190+ if (mSettings .checkConfiguration )
1191+ continue ;
11901192
11911193#ifdef HAVE_RULES
1192- // Execute rules for "raw" code
1193- executeRules (" raw" , tokenizer.list );
1194+ // Execute rules for "raw" code
1195+ executeRules (" raw" , tokenizer.list );
11941196#endif
11951197
1198+ try {
11961199 // Simplify tokens into normal form, skip rest of iteration if failed
11971200 if (!tokenizer.simplifyTokens1 (currentConfig, fileIndex))
11981201 continue ;
0 commit comments