mirror of
https://github.com/github/codeql.git
synced 2026-07-06 03:55:30 +02:00
For those documents with no obvious new home I've pointed the links to the Internet Archive.
39 lines
1.2 KiB
XML
39 lines
1.2 KiB
XML
<!DOCTYPE qhelp PUBLIC
|
|
"-//Semmle//qhelp//EN"
|
|
"qhelp.dtd">
|
|
<qhelp>
|
|
<overview>
|
|
<p>This metric measures the number of files that are directly or indirectly included using <code>#include</code>.</p>
|
|
|
|
<p>The value of this metric is usually directly correlated to the file's
|
|
build time: the more included files, the longer the compilation time.</p>
|
|
|
|
<p>Often, files with a large number of includes do not require most of the included definitions, so they are contributing to unnecessarily long build times.</p>
|
|
</overview>
|
|
|
|
<recommendation>
|
|
|
|
<ul>
|
|
<li>Remove redundant <code>#include</code> directives</li>
|
|
<li>Use the specific header file required, if possible, rather than a high-level header that includes many other header files as well</li>
|
|
<li>Split header files that contain lots of unrelated definitions or include large unrelated header files</li>
|
|
</ul>
|
|
|
|
</recommendation>
|
|
<references>
|
|
|
|
<li>
|
|
<a href="http://www.learncpp.com/cpp-tutorial/19-header-files/">Header files</a>
|
|
</li>
|
|
<li>
|
|
<a href="http://www.drdobbs.com/cpp/decoupling-c-header-files/212701130">Decoupling C Header Files</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://accu.org/journals/overload/14/72/griffiths_1995/">C++ Best Practice -
|
|
Designing Header Files</a>
|
|
</li>
|
|
|
|
|
|
</references>
|
|
</qhelp>
|