Facebook removes C++ lint with new analysis tool

Facebook has open sourced its Flint static analysis tool, which supports the latest version of C++

Facebook has released as open source a code analyzer tool, typically called a linter, that can work with the latest version of the C++ language, C++11.

The internally developed debugger, called Flint, may be of interest to other programmers because many similar open-source lint tools haven't been upgraded to work with C++11 yet, according to Facebook.

Noted C++ programmer Andrei Alexandrescu, now working at Facebook, built the tool for internal use.

A lint program typically scans software code to look for issues that a compiler does not catch, a process called static code analysis. Linters can be handy for enforcing organizational best practices in code development, or to look for code patterns that could cause security or performance issues.

Although there are a number of static analysis programs already available for C++, Facebook found them mostly unsuitable for its own needs. Many were too slow or weren't updated to understand C++11, which Facebook is in the process of adopting. Flint reviews code and flags any potential issues in Facebook's code review system, called Phabricator.

Flint can check for issues such as the use of outdated libraries, or keywords that have already been reserved for other uses within a system. It can catch subtle programming errors that a compiler would miss, such as an incorrectly formatted memory request. It can assure that headers are formatted correctly. It can also check for conflicting namespace directives.

Alexandrescu wrote Flint using a programming language similar to C++ he helped develop, called D. As a result, Flint compiles fives times as fast as an equivalent program in C++, and it runs anywhere from 5 percent to 25 percent faster as well.

Flint is one of a number of tools Facebook developed internally and later released as open source. Other recent releases include the Presto query engine and a PHP virtual machine called HipHop.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Join the Good Gear Guide newsletter!

Error: Please check your email address.

Tags Development toolsapplication developmentsoftwareFacebook

Struggling for Christmas presents this year? Check out our Christmas Gift Guide for some top tech suggestions and more.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service

Most Popular Reviews

Follow Us

Best Deals on GoodGearGuide

Shopping.com

Latest News Articles

Resources

GGG Evaluation Team

Kathy Cassidy

STYLISTIC Q702

First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.

Anthony Grifoni

STYLISTIC Q572

For work use, Microsoft Word and Excel programs pre-installed on the device are adequate for preparing short documents.

Steph Mundell

LIFEBOOK UH574

The Fujitsu LifeBook UH574 allowed for great mobility without being obnoxiously heavy or clunky. Its twelve hours of battery life did not disappoint.

Andrew Mitsi

STYLISTIC Q702

The screen was particularly good. It is bright and visible from most angles, however heat is an issue, particularly around the Windows button on the front, and on the back where the battery housing is located.

Simon Harriott

STYLISTIC Q702

My first impression after unboxing the Q702 is that it is a nice looking unit. Styling is somewhat minimalist but very effective. The tablet part, once detached, has a nice weight, and no buttons or switches are located in awkward or intrusive positions.

Latest Jobs

Shopping.com

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?