GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - JossWhittle/FlintPlusPlus: Flint++ is cross-platform, zero-dependency port of flint, a lint program for C++ developed and used at Facebook.

This repository was archived by the owner on Aug 29, 2023. It is now read-only.
BranchesTags
Open more actions menu
 
 

Latest commit

 

History

257 Commits
257 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
debian
debian
 
 
flint
flint
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
The Lint API Guide.md
The Lint API Guide.md
 
 
flint++.1
flint++.1
 
 

Repository files navigation

Flint++

A Cross Platform Port of Facebook's C++ Linter

Flint++ is cross-platform, zero-dependency port of flint, a lint program for C++ developed and used at Facebook.

This project was motivated by a desire for a modern and extendable C++ Linter that just worked. Facebook had already done a fantastic job with their flint project; but through an unnecessarily high number of dependencies, poor documentation, and OS dependent coding the project is almost unusable. Flint++ aims to solve these problems by only using the C++11 std::library along with a minimal number of polyfill functions developed to bridge the gaps in the needed functionality.

The original flint is published on Github; and for discussions, there is a Google group.

Upcoming Features

  • More lint tests!
  • Visual Studio Integration!
  • JSON Config files to allow project dependent Lint settings
    • Set custom blacklisted identifiers/token sequences/includes
    • Enable/Disable certain tests
    • Track the config file with Git to give everyone on your team the same Lint checks

Current Lint Checks

  • Errors
    • Blacklisted Identifiers
    • Initialization from Self
    • #if ... #endif Balance
    • memset Usage
    • Include Associated Header First
    • Include Guards
    • Inl-Header Inclusions
    • Check for unamed mutex holders
    • explicit single argument constructors
    • try-catch by reference
    • Check for throw new ...
    • Check unique_ptr arrays
  • Warnings
    • Blacklisted Sequences
    • #define name rules
    • Deprecated #includes
    • Check for static scope
    • Warn about smart_ptr usage
    • implicit casts
    • protected inheritance
    • Check exception inheritance
    • Check for virtual destructors
    • function level throws
  • Advice
    • nullptr over NULL

Usage

$ flint++ --help
Usage: flint++ [options:] [files:]

-r, --recursive		  : Search subfolders for files.
-c, --cmode			  : Only perform C based lint checks.
-j, --json			  : Output report in JSON format.
-v, --verbose		  : Print full file paths.
-l, --level [def = 3] : Set the lint level.
		            1 : Errors only
		            2 : Errors & Warnings
		            3 : All feedback

-h, --help		      : Print usage.

Does it pass Linting itself?

Yes!

$ flint++ ./

Lint Summary: 13 files
Errors: 0 Warnings: 0 Advice: 0

Compiling Flint++ from source

From the flint subdirectory, use make with the included makefile to build on a Posix based system using G++ > v4.7. To run the simple output test case run make tests after compilation. This will run Flint++ on the test directory and compare its output to the text stored in tests/expected.txt.

Why Lint?

Linting is a form of static-code analysis by which common errors and bad practices are flagged for review. This can help to both optimize poorly written code and to set a unified code style for all the code in a project. For large organizations this can be tremendously powerful as it helps to keep the whole codebase consistent.

Dependencies

Windows, Unix, Linux, OSX

None! You're good to go! Happy linting :)

Edit: It's not really a dependency, but it's worth noting that this project makes extensive use of the C++11 Feature Set. You probably won't be able to compile it on a Pre-C++11 version of your compiler.

Tested On

So far I've managed to compile and test Flint++ on Windows 7/8/8.1, Ubuntu 14.04, and Raspbian Wheezy; compiling under MSVC++ '13 and G++ 4.7 respectively. Edit: We also have word people have successfully compiled under OSX with Clang 3.5


Lead Contributers: @L2Program (Joss Whittle) & @kanielc (Denton Cockburn)


##Pull Requests Welcome!

About

Flint++ is cross-platform, zero-dependency port of flint, a lint program for C++ developed and used at Facebook.

Resources

Readme
BSL-1.0 license
Activity

Stars

265 stars

Watchers

2 watching

Forks

20 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.