AdLint - Advanced Lint

AdLint is a source code static analyzer.

It can point out unreliable or nonportable code fragments, and can measure various quality metrics of the source code.

It (currently) can analyze source code compliant with ANSI C89 / ISO C90 and partly ISO C99.

For more details, visit our project homepage at <http://adlint.sourceforge.net/>.

How to Install

Prerequisites

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.

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.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’.

License

Copyright © 2010-2014, OGIS-RI Co.,Ltd.

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/>.

Further Reading

TODO

Any contributions are welcome!

Authors