forked from sjas/adlint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
79 lines (56 loc) · 2.88 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
--
___ ____ __ ___ _________
/ | / _ |/ / / / | / /__ __/ Source Code Static Analyzer
/ /| | / / / / / / / |/ / / / AdLint - Advanced Lint
/ __ |/ /_/ / /___/ / /| / / /
/_/ |_|_____/_____/_/_/ |_/ /_/ Copyright (C) 2010-2014, OGIS-RI Co.,Ltd.
This file is part of AdLint.
AdLint is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
AdLint is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
AdLint. If not, see <http://www.gnu.org/licenses/>.
++
=== Prerequisites
* Ruby 1.9.3-p0 or later for normal use [*mandatory*]
* GNU Make 3 or later to use adlintized Makefile [optional but recommended]
* Racc 1.4.7 for development [optional]
=== Installation
Setup your Ruby interpreter.
Then, you can install \AdLint by following instruction.
% gem install adlint
=== Evaluation
Tiny sample C language projects are bundled with \AdLint gem.
You can evaluate \AdLint by following instructions.
First, copy \`intro_demo' project into your workspace. "+adlint+ +--prefix+"
command prints the prefix pathname of the \AdLint installation directory.
% cp -r `adlint --prefix`/share/demo/intro_demo .
Second, generate configuration files for \AdLint.
% cd intro_demo
% adlintize
Following files will be generated.
* [+GNUmakefile+] Automatic analysis Makefile for GNU Make.
* [+adlint_traits.yml+] \AdLint configuration file.
* [+adlint_pinit.h+] Project specific initial header file.
* [+adlint_cinit.h+] Compiler specific initial header file.
* [+adlint_all.sh+] Automatic analysis shell script.
* [+adlint_all.bat+] Automatic analysis mswin bat file.
* [+adlint_files.txt+] List file for sh script and bat file.
Finally, do analysis.
% make verbose-all
adlint --verbose -t adlint_traits.yml -o . intro_demo.c
intro_demo.c [fin] |============================| 0.401s
intro_demo [fin] |============================| 0.029s
1.125s user, 0.765s system, 00:00:01.89 total
Following files will be generated.
* [+intro_demo.i+] Preprocessed source of +intro_demo.c+.
* [+intro_demo.c.met.csv+] Single module code structure and metric information.
* [+intro_demo.c.msg.csv+] Single module warning messages.
* [+intro_demo.met.csv+] Cross module metric information.
* [+intro_demo.msg.csv+] Cross module warning messages.
\`+intro_demo.c.msg.csv+' will tell you that the control will never reach to
some statements and that division by zero will occur in \`+intro_demo.c+'.