From 5fa541653917acc913be00a1dbe85020e8a11fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 4 Mar 2023 11:42:43 +0100 Subject: [PATCH] Tweak missingInclude messages. Users should normally use --library for system includes and -I for local headers. --- lib/preprocessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 25e1377c03b..6c3f750468a 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -855,8 +855,8 @@ void Preprocessor::missingInclude(const std::string &filename, unsigned int line } ErrorMessage errmsg(std::move(locationList), mFile0, Severity::information, (headerType==SystemHeader) ? - "Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results." : - "Include file: \"" + header + "\" not found.", + "Include file: <" + header + "> not found. Please note: Normally include paths for system headers should not be provided, use --library instead." : + "Include file: \"" + header + "\" not found. It's usually best to provide include paths to local headers in your project using -I.", std::move(errorId), Certainty::normal); mErrorLogger->reportErr(errmsg);