Code Monkey home page Code Monkey logo

cpp-checker's Introduction

cpp-checker

GitHub release GitHub license GitHub stars GitHub fork GitHub issues

A fork of cpp-check-lint by QiuminGe

Features

  • cppcheck/cpplint:
    • editor/context
      • check current file
      • check the directory of the current file
      • cmd :
        • clear all
        • clear current file
        • stop check
    • explorer/context
      • check directory || check current file
      • cmd
    • OnSave/QuickFix

Requirements

cppcheck

cpplint

  • Install from source
    https://github.com/cpplint/cpplint
    
  • Install from pip
    pip install cpplint
    

builtin binaries

  • cppcheck 2.4.1

  • cpplint 1.5.5

    support (linux cpplint need python)

    Os Bit Version
    Ubuntu 64 16.04+
    Debian 64 9+
    CentOS 64 7+
    RHEL 64 7+
    Windows 64 7+

Extension Settings

  • Cppcheck:--executable

    if (cppcheck configure is null) {
        use builtin binaries
    } else {
        if( ("path to executable" --version).trim().toLowerCase().startsWith("cppcheck") ){
            use "path to executable"
        } else {
        use builtin binaries 
        }
    }
    
  • Cppcheck:--addon=

    [
        "cert", 
        {
            "script": "misra.py", 
            "args": [
                "--rule-texts=/home/user/misra.txt"
            ]
        }, 
        "y2038.py", 
        "C:\\UsersAdministrator\\hreadsafety.json"
    ]

    "addon" and "addon.py" will use addons folder under the same level folder as cppcheck .

    [rorot@cpppcheck]$ tree | grep -E " cppcheck.exe| addons| misra.py| y2038.py| cert.py| threadsafety.py"
    ├── addons
    │   ├── cert.py
    │   ├── misra.py
    │   ├── threadsafety.py
    │   └── y2038.py
    ├── cppcheck.exe
    

    Some addons need extra arguments. You can configure json or json file.

    {
        "script": "misra.py",
        "args": [
            "--rule-texts=/home/user/misra.txt"
        ]
    }
    "--rule-texts=/home/user/misra.txt" (need absolute path, and use "/" or "\\" to split paths)
    If ${workspace folder} is included, it will be replaced.
    "args": ["--rule-texts=${workspaceFolder}/rule/misra.txt"] -> "args":["--rule-texts=D:/code/demo/rule/misra.txt"]}
    
  • Cpplint:--executable

    if (cpplint configure is null) {
        use builtin binaries
    } else {
        if("path to executable"){
            use "path to executable"
        } else {
            use builtin binaries 
        }
    } 
    
  • Cpplint:--recursive

  • Cpplint:--lintdir

    if ( cpplint version support "--recursive") {
            set --recursive true
        } else {
            set "--recursive" false
            set "--lintdir"
    }
    
  • customargs

    If the configuration parameters cannot be satisfied, use custom configuration "--customargs="

  • OnSave

    cpplint suggest use with clang-format

  • QuickFix

    It's just suppresses alarms

  • Configure

    skip unsupported flag

    type value
    bool false
    string ""
    number null
    object null

Known Issues

Source code


cpp-checker's People

Contributors

qiuminge avatar cvaliere avatar lubomilko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.