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

1.4.5

Runtime

Python 2.7.13

Supported Languages

C 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.
      Errors with lower verbosity levels have lower confidence and are more
      likely to be false positives.
    
    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.
      This directory is relative to the top level directory of the repository
      which by default is determined by searching for a directory that contains
      .git, .hg, or .svn but can also be controlled with the --repository flag.
      If the specified directory does not exist, this flag is ignored.
      Examples:
        Assuming that src is the top level directory of the repository (and
        cwd=top/src), the header guard CPP variables for
        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=c,cc,h,hpp,c++,h++,hh,cu,cpp,hxx,cxx,cuh
    
    headers=x,y,...
      The header extensions that cpplint will treat as .h in checks. Values are
      automatically added to --extensions list.
     (by default, only files with extensions set(['h', 'hpp', 'h++', 'hh', 'hxx', 'cuh']) will be assumed to be headers)
      Examples:
        --headers=h,hpp,h++,hh,hxx,cuh
        --headers=hpp,hxx
        --headers=hppxs
    
  • thresholds:

    • num-issues:

      No tool specific severity levels are available.

  • incremental:

    true/false

    Note: The incremental analysis is disabled if any of configuration files named **/CPPLINT.cfg are changed.

  • experimental:

    No tool specific experimental options are available.

YAML Examples

  • With default options:

    inspecode:
      tools:
        cpplint: default
    
  • With custom machine:

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

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

results matching ""

    No results matching ""