|
13 | 13 | <link rel="stylesheet" type="text/css" href="/site/css/pack.css" /> |
14 | 14 | <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> |
15 | 15 | <link rel="alternate" type="application/rss+xml" title="Project News" |
16 | | - href="http://sourceforge.net/p/cppcheck/news/feed" /> |
| 16 | + href="https://sourceforge.net/p/cppcheck/news/feed" /> |
17 | 17 | </head> |
18 | 18 | <body> |
19 | 19 | <div id="header"> |
|
26 | 26 | <div class="wrap"> |
27 | 27 | <ul> |
28 | 28 | <li><strong><a href="/">Home</a></strong></li> |
29 | | - <li><a href="http://sourceforge.net/p/cppcheck/wiki/">Wiki</a></li> |
30 | | - <li><a href="http://sourceforge.net/p/cppcheck/discussion/">Forum</a></li> |
31 | | - <li><a href="http://trac.cppcheck.net">Issues</a></li> |
| 29 | + <li><a href="https://sourceforge.net/p/cppcheck/wiki/">Wiki</a></li> |
| 30 | + <li><a href="https://sourceforge.net/p/cppcheck/discussion/">Forum</a></li> |
| 31 | + <li><a href="https://trac.cppcheck.net">Issues</a></li> |
32 | 32 | <li><a href="/devinfo/" title="Developer Information">Developer Info</a></li> |
33 | | - <li><a href="http://sourceforge.net/projects/cppcheck/">Project page</a></li> |
| 33 | + <li><a href="https://sourceforge.net/projects/cppcheck/">Project page</a></li> |
34 | 34 | </ul> |
35 | 35 | </div> <!-- .wrap --> |
36 | 36 | </div> <!-- #tabs --> |
|
49 | 49 | <div id="content"> |
50 | 50 | <div class="wrap"> |
51 | 51 | <p> |
52 | | -<strong>Cppcheck</strong> is a <a href="http://en.wikipedia.org/wiki/Static_analysis_tool">static analysis tool</a> |
| 52 | +<strong>Cppcheck</strong> is a <a href="https://en.wikipedia.org/wiki/Static_analysis_tool">static analysis tool</a> |
53 | 53 | for C/C++ code. It provides <a href="#unique">unique code analysis</a> to detect bugs and focuses on detecting undefined behaviour and |
54 | 54 | dangerous coding constructs. The goal is to have very few false positives. |
55 | 55 | Cppcheck is designed to be able to analyze your C/C++ code even if it has non-standard syntax (common in embedded projects). |
|
67 | 67 | </tr> |
68 | 68 | <tr> |
69 | 69 | <td>Windows 64-bit (No XP support)</td> |
70 | | - <td><a href="https://github.com/danmar/cppcheck/releases/download/2.20.0/cppcheck-2.20.0-x64-Setup.msi">Installer</a></td> |
| 70 | + <td><a href="https://github.com/cppcheck-opensource/cppcheck/releases/download/2.20.0/cppcheck-2.20.0-x64-Setup.msi">Installer</a></td> |
71 | 71 | </tr> |
72 | 72 | <tr> |
73 | 73 | <td>Source code (.zip)</td> |
74 | | - <td><a href="https://github.com/danmar/cppcheck/archive/2.20.0.zip">Archive</a></td> |
| 74 | + <td><a href="https://github.com/cppcheck-opensource/cppcheck/archive/2.20.0.zip">Archive</a></td> |
75 | 75 | </tr> |
76 | 76 | <tr> |
77 | 77 | <td>Source code (.tar.gz)</td> |
78 | | - <td><a href="https://github.com/danmar/cppcheck/archive/2.20.0.tar.gz">Archive</a></td> |
| 78 | + <td><a href="https://github.com/cppcheck-opensource/cppcheck/archive/2.20.0.tar.gz">Archive</a></td> |
79 | 79 | </tr> |
80 | 80 | </table> |
81 | 81 |
|
|
107 | 107 | { |
108 | 108 | int buf[10]; |
109 | 109 | if (x == 1000) |
110 | | - buf[x] = 0; // <- ERROR |
| 110 | + buf[x] = 0; // <- ERROR |
111 | 111 | }</pre> |
112 | 112 |
|
113 | 113 | <p>Most tools can determine that the array index will be 1000 and there will be overflow.</p> |
|
117 | 117 | <pre>void foo(int x) |
118 | 118 | { |
119 | 119 | int buf[10]; |
120 | | - buf[x] = 0; // <- ERROR |
| 120 | + buf[x] = 0; // <- ERROR |
121 | 121 | if (x == 1000) {} |
122 | 122 | }</pre> |
123 | 123 |
|
|
185 | 185 | <p>Security experts recommend that static analysis is used. And using several tools is the best approach from a security perspective.</p> |
186 | 186 |
|
187 | 187 | <h3 id="coding-standards">Coding standards</h3> |
188 | | -<table border="1" bgcolor="white"> |
189 | | -<tr><th>Coding standard<th><th> Open Source </th><th> Premium </th></tr> |
190 | | -<tr><td> Misra C 2012 - original rules <td><td> Partial</td><td> Yes</td></tr> |
191 | | -<tr><td> Misra C 2012 - amendment #1 <td><td> Partial</td><td> Yes</td></tr> |
192 | | -<tr><td> Misra C 2012 - amendment #2 <td><td> Partial</td><td> Yes</td></tr> |
193 | | -<tr><td> Misra C 2012 - amendment #3 <td><td></td><td> Yes</td></tr> |
194 | | -<tr><td> Misra C 2012 - amendment #4 <td><td></td><td> Yes</td></tr> |
195 | | -<tr><td> Misra C 2012 - Compliance report <td><td></td><td> Yes</td></tr> |
196 | | -<tr><td> Misra C 2012 - Rule texts <td><td> User provided</td><td> Yes</td></tr> |
197 | | -<tr><td> Misra C 2023 <td><td></td><td> Yes</td></tr> |
198 | | -<tr><td> Misra C++ 2008 <td><td></td><td> Yes</td></tr> |
199 | | -<tr><td> Misra C++ 2023 <td><td></td><td> Yes</td></tr> |
200 | | -<tr><td> Cert C <td><td></td><td> Yes</td></tr> |
201 | | -<tr><td> Cert C++ <td><td></td><td> Yes</td></tr> |
202 | | -<tr><td> Autosar <td><td></td><td> <a href="https://files.cppchecksolutions.com/autosar.html">Partial</a></td></tr> |
| 188 | +<table class="table"> |
| 189 | + <tr><th>Coding standard</th><th>Open Source</th><th align="center">Premium</th></tr> |
| 190 | + <tr><td>Misra C 2012 - original rules</td><td>Partial</td><td align="center">Yes</td></tr> |
| 191 | + <tr><td>Misra C 2012 - amendment #1</td><td>Partial</td><td align="center">Yes</td></tr> |
| 192 | + <tr><td>Misra C 2012 - amendment #2</td><td>Partial</td><td align="center">Yes</td></tr> |
| 193 | + <tr><td>Misra C 2012 - amendment #3</td><td></td><td align="center">Yes</td></tr> |
| 194 | + <tr><td>Misra C 2012 - amendment #4</td><td></td><td align="center">Yes</td></tr> |
| 195 | + <tr><td>Misra C 2012 - Compliance report</td><td></td><td align="center">Yes</td></tr> |
| 196 | + <tr><td>Misra C 2012 - Rule texts</td><td>User provided</td><td align="center">Yes</td></tr> |
| 197 | + <tr><td>Misra C 2023</td><td></td><td align="center">Yes</td></tr> |
| 198 | + <tr><td>Misra C++ 2008</td><td></td><td align="center">Yes</td></tr> |
| 199 | + <tr><td>Misra C++ 2023</td><td></td><td align="center">Yes</td></tr> |
| 200 | + <tr><td>Cert C</td><td></td><td align="center">Yes</td></tr> |
| 201 | + <tr><td>Cert C++</td><td></td><td align="center">Yes</td></tr> |
| 202 | + <tr><td>Autosar</td><td></td><td align="center"><a href="https://files.cppchecksolutions.com/autosar.html">Partial</a></td></tr> |
203 | 203 | </table> |
204 | 204 |
|
205 | 205 |
|
206 | 206 | <h3>All checks</h3> |
207 | | -<p>For a list of all checks in Cppcheck see: <a href="http://sourceforge.net/p/cppcheck/wiki/ListOfChecks">http://sourceforge.net/p/cppcheck/wiki/ListOfChecks</a>.</p> |
| 207 | +<p>For a list of all checks in Cppcheck see: <a href="https://sourceforge.net/p/cppcheck/wiki/ListOfChecks">https://sourceforge.net/p/cppcheck/wiki/ListOfChecks</a>.</p> |
208 | 208 |
|
209 | 209 | <h2>Clients and plugins</h2> |
210 | 210 | <p>Cppcheck is integrated with many popular development tools. For instance:</p> |
211 | 211 | <ul> |
212 | 212 | <li><strong>Buildbot</strong> - <a href="https://docs.buildbot.net/latest/manual/configuration/steps/cppcheck.html">integrated</a></li> |
213 | 213 | <li><strong>CLion</strong> - <a href="https://plugins.jetbrains.com/plugin/8143">Cppcheck plugin</a></li> |
214 | 214 | <li><strong>Code::Blocks</strong> - <em>integrated</em></li> |
215 | | - <li><strong>CodeDX</strong> (software assurance tool) - <a href="http://codedx.com/code-dx-standard/">integrated</a></li> |
| 215 | + <li><strong>CodeDX</strong> (software assurance tool) - <a href="https://codedx.com/code-dx-standard/">integrated</a></li> |
216 | 216 | <li><strong>CodeLite</strong> - <em>integrated</em></li> |
217 | | - <li><strong>CppDepend 5</strong> - <a href="http://www.cppdepend.com/CppDependV5.aspx">integrated</a></li> |
| 217 | + <li><strong>CppDepend 5</strong> - <a href="https://www.cppdepend.com/CppDependV5.aspx">integrated</a></li> |
218 | 218 | <li><strong>Eclipse</strong> - <a href="https://github.com/cppchecksolutions/cppcheclipse/wiki/Installation">Cppcheclipse</a></li> |
219 | | - <li><strong>gedit</strong> - <a href="http://github.com/odamite/gedit-cppcheck">gedit plugin</a></li> |
220 | | - <li><strong>github</strong> - <a href="https://www.codacy.com/">Codacy</a>, <a href="https://www.codety.io/">Codety</a> and <a href="http://www.softacheck.com/">SoftaCheck</a></li> |
221 | | - <li><strong>Hudson</strong> - <a href="http://wiki.hudson-ci.org/display/HUDSON/Cppcheck+Plugin">Cppcheck Plugin</a></li> |
222 | | - <li><strong>Jenkins</strong> - <a href="http://wiki.jenkins-ci.org/display/JENKINS/Cppcheck+Plugin">Cppcheck Plugin</a></li> |
| 219 | + <li><strong>gedit</strong> - <a href="https://github.com/odamite/gedit-cppcheck">gedit plugin</a></li> |
| 220 | + <li><strong>github</strong> - <a href="https://www.codacy.com/">Codacy</a>, <a href="https://www.codety.io/">Codety</a> and <a href="https://www.softacheck.com/">SoftaCheck</a></li> |
| 221 | + <li><strong>Hudson</strong> - <a href="https://wiki.hudson-ci.org/display/HUDSON/Cppcheck+Plugin">Cppcheck Plugin</a></li> |
| 222 | + <li><strong>Jenkins</strong> - <a href="https://wiki.jenkins-ci.org/display/JENKINS/Cppcheck+Plugin">Cppcheck Plugin</a></li> |
223 | 223 | <li><strong>KDevelop</strong> - <a href="https://kdevelop.org/">integrated since v5.1</a></li> |
224 | | - <li><strong>Mercurial (Linux)</strong> - <a href="http://sourceforge.net/p/cppcheck/wiki/mercurialhook/">pre-commit hook</a> - Check for new errors on commit (requires interactive terminal)</li> |
| 224 | + <li><strong>Mercurial (Linux)</strong> - <a href="https://sourceforge.net/p/cppcheck/wiki/mercurialhook/">pre-commit hook</a> - Check for new errors on commit (requires interactive terminal)</li> |
225 | 225 | <li><strong>QtCreator</strong> - <a href="https://sourceforge.net/projects/qtprojecttool/files">Qt Project Tool (qpt)</a></li> |
226 | | - <li><strong>Tortoise SVN</strong> - <a href="http://omerez.com/automatic-static-code-analysis/">Adding a pre-commit hook script</a></li> |
| 226 | + <li><strong>Tortoise SVN</strong> - <a href="https://omerez.com/automatic-static-code-analysis/">Adding a pre-commit hook script</a></li> |
227 | 227 | <li><strong>Vim</strong> - <a href="https://vimhelp.org/quickfix.txt.html#compiler-cppcheck">Vim Compiler</a></li> |
228 | 228 | <li><strong>Visual Studio</strong> - <a href="https://github.com/VioletGiraffe/cppcheck-vs-addin/releases/latest">Visual Studio plugin</a></li> |
229 | 229 | <li><strong>VScode</strong> - <a href="https://marketplace.visualstudio.com/items?itemName=CppcheckSolutionsAB.cppcheck-official">VScode plugin</a></li> |
|
257 | 257 |
|
258 | 258 | <h2 id="documentation">Documentation</h2> |
259 | 259 | <p>You can read the <a href="manual.pdf">manual</a> or download some |
260 | | -<a href="http://sourceforge.net/projects/cppcheck/files/Articles/">articles</a>.</p> |
| 260 | +<a href="https://sourceforge.net/projects/cppcheck/files/Articles/">articles</a>.</p> |
261 | 261 |
|
262 | 262 | <h2 id="support">Support</h2> |
263 | 263 | <ul> |
264 | | - <li>Use <a href="http://trac.cppcheck.net">Trac</a> to report bugs and feature requests</li> |
| 264 | + <li>Use <a href="https://trac.cppcheck.net">Trac</a> to report bugs and feature requests</li> |
265 | 265 | <li>Ask questions at the IRC channel <a href="irc://irc.libera.chat/#cppcheck">#cppcheck</a></li> |
266 | 266 | </ul> |
267 | 267 |
|
|
280 | 280 | <dl> |
281 | 281 | <dt>Testing</dt> |
282 | 282 | <dd>Pick a project and test its source with the latest version of Cppcheck. |
283 | | - Submit tickets to <a href="http://trac.cppcheck.net">Trac</a> about the |
| 283 | + Submit tickets to <a href="https://trac.cppcheck.net">Trac</a> about the |
284 | 284 | issues you find in Cppcheck.</dd> |
285 | 285 | <dt>Developing</dt> |
286 | | - <dd>Pick a ticket from <a href="http://trac.cppcheck.net">Trac</a>, |
| 286 | + <dd>Pick a ticket from <a href="https://trac.cppcheck.net">Trac</a>, |
287 | 287 | write a test case for it (and write a comment to the ticket for which that |
288 | 288 | test case has been created). Alternatively, pick a test case that fails and |
289 | 289 | try to fix it. Make a patch and submit it to Trac either inline, if it is |
|
293 | 293 | have, the more people we have testing and the better we can become.</dd> |
294 | 294 | <dt>Design</dt> |
295 | 295 | <dd>Come up with some new good checks, and create tickets in |
296 | | - <a href="http://trac.cppcheck.net">the Trac instance</a> |
| 296 | + <a href="https://trac.cppcheck.net">the Trac instance</a> |
297 | 297 | about them.</dd> |
298 | 298 | <dt>Integration</dt> |
299 | 299 | <dd>Write a plugin for your favorite IDE or create a package for your |
|
0 commit comments