author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 22 Feb 2016 12:46:36 +0200 | |
changeset 1905 | fba288d59662 |
parent 1639 | ad05334bf5d4 |
child 1912 | 8b81a8f0f692 |
permissions | -rw-r--r-- |
1167 | 1 |
.. -*- coding: utf-8; -*- |
1334
9bf0d5a1f0cf
Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1322
diff
changeset
|
2 |
.. include:: HEADER.rst |
1167 | 3 |
|
4 |
================ |
|
5 |
Code analysis. |
|
6 |
================ |
|
1187 | 7 |
.. contents:: |
1905
fba288d59662
Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1639
diff
changeset
|
8 |
:local: |
1167 | 9 |
|
10 |
About. |
|
11 |
====== |
|
12 |
||
13 |
* http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis |
|
1179 | 14 |
* http://en.wikipedia.org/wiki/Static_code_analysis |
1175
eef4d07eff61
Program_verification
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1174
diff
changeset
|
15 |
* http://en.wikipedia.org/wiki/Automated_code_review |
1176 | 16 |
* http://en.wikipedia.org/wiki/Dynamic_code_analysis |
1175
eef4d07eff61
Program_verification
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1174
diff
changeset
|
17 |
* http://en.wikipedia.org/wiki/Program_analysis_%28computer_science%29 |
eef4d07eff61
Program_verification
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1174
diff
changeset
|
18 |
* http://en.wikipedia.org/wiki/Performance_analysis |
eef4d07eff61
Program_verification
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1174
diff
changeset
|
19 |
* http://en.wikipedia.org/wiki/Program_verification |
1167 | 20 |
|
1170 | 21 |
Splint. |
22 |
======= |
|
23 |
||
24 |
Secure Programming Lint, is a programming tool for statically checking C |
|
25 |
programs for security vulnerabilities and coding mistakes. Formerly called |
|
26 |
LCLint, it is a modern version of the Unix lint tool. |
|
27 |
||
28 |
http://en.wikipedia.org/wiki/Splint_%28programming_tool%29 |
|
29 |
||
1322 | 30 |
weblint. |
31 |
======== |
|
32 |
||
33 |
Syntax and minimal style checker for HTML. |
|
34 |
||
35 |
lintsh. |
|
36 |
======= |
|
37 |
||
38 |
Lintsh is a Bourne shell that optionally warns about suspicious or nonportable |
|
39 |
constructs. |
|
40 |
||
41 |
http://code.dogmap.org/lintsh/ |
|
42 |
Home page. |
|
43 |
||
1176 | 44 |
Valgrind. |
45 |
========= |
|
46 |
||
47 |
Runs programs on a virtual processor and can detect memory errors (e.g., misuse |
|
48 |
of malloc and free) and race conditions in multithread programs. |
|
49 |
||
50 |
http://en.wikipedia.org/wiki/Valgrind |
|
51 |
Wikipedia page. |
|
52 |
||
1179 | 53 |
Dmalloc. |
54 |
======== |
|
55 |
||
56 |
Dmalloc is a memory debugger C library. |
|
57 |
||
58 |
http://en.wikipedia.org/wiki/Dmalloc |
|
59 |
||
1180 | 60 |
Avalanche. |
61 |
========== |
|
62 |
||
63 |
Avalanche is a dynamic defect detection tool that generates "inputs of death" - |
|
64 |
input data reproducing critical bugs and vulnerabilities in the analysed |
|
65 |
program. |
|
66 |
||
67 |
http://code.google.com/p/avalanche/ |
|
68 |
Home page. |
|
69 |
http://en.wikipedia.org/wiki/Avalanche_%28dynamic_analysis_tool%29 |
|
70 |
Wikipedia page. |
|
71 |
||
1170 | 72 |
Sparse. |
73 |
======= |
|
74 |
||
75 |
Sparse is a tool designed to find possible coding faults in the Linux kernel. |
|
76 |
||
77 |
http://en.wikipedia.org/wiki/Sparse |
|
78 |
Wikipedia page. |
|
79 |
||
1167 | 80 |
PMD. |
81 |
==== |
|
82 |
||
83 |
PMD is a static ruleset based Java source code analyzer that identifies |
|
84 |
potential problems. |
|
85 |
||
86 |
PMD has plugins for JDeveloper, Eclipse, JEdit, JBuilder, Omnicore's CodeGuide, |
|
87 |
NetBeans/Sun Studio, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, Hudson, |
|
88 |
Jenkins, Sonar and Emacs. |
|
89 |
||
90 |
http://pmd.sf.net/ |
|
91 |
Home page. |
|
92 |
http://en.wikipedia.org/wiki/PMD_%28software%29 |
|
1168 | 93 |
Wikipedia page. |
94 |
||
1171 | 95 |
Checkstyle. |
96 |
=========== |
|
97 |
||
98 |
Static code analysis tool used in software development for checking if Java |
|
99 |
source code complies with coding rules. |
|
100 |
||
101 |
http://en.wikipedia.org/wiki/Checkstyle |
|
102 |
Wikipedia page. |
|
103 |
||
104 |
FindBugs. |
|
105 |
========= |
|
106 |
||
107 |
http://en.wikipedia.org/wiki/FindBugs |
|
108 |
Wikipedia page. |
|
109 |
||
1174 | 110 |
Pychecker. |
111 |
========== |
|
112 |
||
113 |
http://en.wikipedia.org/wiki/Pychecker |
|
114 |
Wikipedia page. |
|
115 |
||
116 |
Pylint. |
|
117 |
======= |
|
118 |
||
119 |
http://en.wikipedia.org/wiki/Pylint |
|
120 |
Wikipedia page. |
|
121 |
||
1173 | 122 |
JSLint. |
123 |
======= |
|
124 |
||
125 |
JSLint is a static code analysis tool used in software development for checking |
|
126 |
if JavaScript source code complies with coding rules. |
|
127 |
||
128 |
It is provided primarily as an online tool, but there are also command-line |
|
129 |
adaptations. |
|
130 |
||
131 |
http://en.wikipedia.org/wiki/JSLint |
|
132 |
Wikipedia page. |
|
133 |
||
1172 | 134 |
Squale. |
135 |
======= |
|
136 |
||
137 |
Squale (Software Quality Enhancement) is an open-source platform that helps |
|
138 |
monitoring software quality for multi-language applications. It currently |
|
139 |
supports Java out-of-the-box, and can also analyse C/C++ and Cobol code with an |
|
140 |
adapter to McCabe tool. Squale is distributed under the terms of the LGPL v3 |
|
141 |
licence. |
|
142 |
||
143 |
http://en.wikipedia.org/wiki/Squale |
|
144 |
Wikipedia page. |
|
145 |
||
1168 | 146 |
Yasca. |
147 |
====== |
|
148 |
||
149 |
Yasca leverages external open source programs, such as FindBugs, PMD, JLint, |
|
150 |
JavaScript Lint, PHPLint, Cppcheck, ClamAV, Pixy, and RATS to scan specific file |
|
151 |
types, and also contains many custom scanners developed for Yasca. |
|
152 |
||
153 |
http://yasca.org/ |
|
154 |
Home page. |
|
155 |
http://yasca.org/ |
|
156 |
Development home page. |
|
157 |
http://en.wikipedia.org/wiki/Yasca |
|
158 |
Wikipedia page. |
|
159 |
||
1169 | 160 |
Sonar. |
161 |
====== |
|
162 |
||
163 |
Sonar uses various static code analysis tools such as Checkstyle, PMD, FindBugs, |
|
164 |
Clover to extract software metrics. |
|
165 |
||
166 |
http://en.wikipedia.org/wiki/Sonar_%28software_quality%29 |
|
1172 | 167 |
Wikipedia page. |
168 |
||
1639 | 169 |
sloccount. |
170 |
========== |
|
171 |
||
172 |
Count files or LOC in project hierarchy:: |
|
173 |
||
174 |
$ sudo apt-get install sloccount |
|
175 |
$ sloccount --addlangall $DIR/$PROJ |
|
176 |
$ rm -r $HOME/.slocdata/$PROJ |
|
177 |