cpplint

This is automated checker to make sure a C++ file follows Google's C++ style guide (https://google.github.io/styleguide/cppguide.html).

Version

43d512ba13014d31f96053c0cdf299775681bc73

Runtime

Python 2.7.13

Supported Languages

C++

Official Documentation

https://github.com/google/styleguide/tree/gh-pages/cpplint

YAML Configuration

cpplint:

  • input:

    Patterns to include in execution and reports.

  • ignore:

    Patterns to exclude from execution and reports.

  • auto-fix:

    N/A

  • config-file:

    N/A

  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.25 CPU with 960 MiB RAM.

  • options:

    Below is the list of options that are supported:

    verbose=#
      Specify a number 0-5 to restrict errors to certain verbosity levels.
    
    filter=-x,+y,...
      Specify a comma-separated list of category-filters to apply: only
      error messages whose category names pass the filters will be printed.
      (Category names are printed with the message and look like
      "[whitespace/indent]".)  Filters are evaluated left to right.
      "-FOO" and "FOO" means "do not print categories that start with FOO".
      "+FOO" means "do print categories that start with FOO".
    
      Examples: --filter=-whitespace,+whitespace/braces
                --filter=whitespace,runtime/printf,+runtime/printf_format
                --filter=-,+build/include_what_you_use
    
      To see a list of all the categories used in cpplint, pass no arg:
         --filter=
    
    root=subdir
      The root directory used for deriving header guard CPP variable.
      By default, the header guard CPP variable is calculated as the relative
      path to the directory that contains .git, .hg, or .svn.  When this flag
      is specified, the relative path is calculated from the specified
      directory. If the specified directory does not exist, this flag is
      ignored.
    
      Examples:
        Assuming that top/src/.git exists (and cwd=top/src), the header guard
        CPP variables for top/src/chrome/browser/ui/browser.h are:
    
        No flag => CHROME_BROWSER_UI_BROWSER_H_
        --root=chrome => BROWSER_UI_BROWSER_H_
        --root=chrome/browser => UI_BROWSER_H_
        --root=.. => SRC_CHROME_BROWSER_UI_BROWSER_H_
    
    linelength=digits
      This is the allowed line length for the project. The default value is
      80 characters.
    
      Examples:
        --linelength=120
    
    extensions=extension,extension,...
      The allowed file extensions that cpplint will check
    
      Examples:
        --extensions=hpp,cpp
    
    headers=x,y,...
      The header extensions that cpplint will treat as .h in checks. Values are
      automatically added to --extensions list.
    
      Examples:
        --headers=hpp,hxx
        --headers=hpp
    

YAML Examples

  • With default options:

    inspecode:
      cpplint: default
    
  • With custom machine:

    inspecode:
      cpplint:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
    
  • With custom options:

    inspecode:
      cpplint:
        options:
          --linelength: 80
          --extensions: cpp
    

results matching ""

    No results matching ""