GithubHelp home page GithubHelp logo

ericsson / codechecker Goto Github PK

View Code? Open in Web Editor NEW
2.1K 2.1K 347.0 38.7 MB

CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy

Home Page: https://codechecker.readthedocs.io

License: Apache License 2.0

Python 74.57% CSS 0.12% Shell 0.07% HTML 0.12% Thrift 1.45% JavaScript 5.36% Mako 0.03% C++ 0.66% Objective-C 0.27% Makefile 1.48% C 1.64% Dockerfile 0.10% Java 0.01% TypeScript 0.01% Go 0.01% Vue 14.05% SCSS 0.05% Starlark 0.01% C# 0.01% Smalltalk 0.01%
analysis c clang clang-tidy codechecker cpp database defects docker linux llvm macosx objective-c results-viewer static-analysis static-analyzer static-analyzers vue

codechecker's People

Contributors

balazske avatar bruntib avatar cservakt avatar csordasmarton avatar dependabot[bot] avatar dkrupp avatar gamesh411 avatar gkunz avatar gyorb avatar hpwxf avatar igalex avatar irishrover avatar itzurabhi avatar jay24rajput avatar jimis avatar justindhillon avatar labuwx avatar lorincbalog avatar martong avatar milanlakhani avatar omahs avatar rnkovacs avatar steakhal avatar sylvestre avatar szelethus avatar tmsblgh avatar vodorok avatar whisperity avatar xazax-hun avatar zomen2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codechecker's Issues

quick check

It should be possible to quickly check a small project (set of files) for bugs without storing the results into the postgres db.

The defect list should appear on the console without the bug paths, only showing the source location of the last step of the bugpath, checker name, bug message.

Only the build command should be the required command line parameter:

CodeChecker quickcheck -b "make"

Parsing of the build.log fails when a command has \"\

For example, the program that I am trying to build has this define:
-DDEFAULT_ICU_PLUGINS="/usr/local/lib/icu"\

Codechecker will fail this:
[ERROR] - The compile database is not valid.
[ERROR] - Invalid \escape: line 29848 column 786 (char 10574627)

allow for patterns in skip file - or add whitelist strategy

Thanks for this tool! Looking awesome right now ๐Ÿ‘

My aim is to provide a skip file for CodeChecker within my project's source tree. But I want to only parse my own code and not optional and potential 3rd-party libraries. Thus, I can not put in absolute paths such as /usr/include. As well it's not possible to exclude specific files in the project's source tree (e.g. <PROJECT>/include/3rdparty) as I can not make any assumptions on the location of the project tree.

I tried specifying patterns such as eigen3/, */eigen3, /boost or */boost in a skip file. But that did not work. Only absolute paths such as /usr/include/eigen3 are working.

It would be awesome being able to exclude paths based on patterns or - even better - whitelist only specific files or paths only in the project's source tree.

suppress bug in source code

The following annotation format should be applied above the line where the bug was reported.
The list should contain checker names or the 'all' keyword if all bugs should be suppressed during the analysis.

// codechecker_suppress[checker_name1, checker_name2] reason for suppress
// is that checker is faulty.
int i=0;
or
// codechecker_suppress[all] reason for suppress

The "reason for suppress" field should be given by the user and it is a free text that can contain any character. Only whitespace characters are not accepted. If the "reason for suppress" field is missing, a warning message will be generated in the suppress_comment the bug database.
Reasons specified in multiple lines are accepted.

webgui: show the number of results per checker

Show in the run overview page, in the checker filter dropdown in parenthesis how many hits are in the run, per checker.

Also show the same information for bug priority and suppressed, unsuppressed list.

whitelist for directories and files

sometimes it is useful to specify in a file the directories
from where files need to be checked.

this is especially problematic if the project takes file from many places of the filesystem.

Better skip file handling

A "bug" should be skipped if its path's last point/step should be skipped according to a skip file (given by --skip command line option).

Selectable compiler binary at package build

Introduce a command line parameter
--clang /path/to/clang/binary

to specify to codechecker which clang binary should be used.
If this parameter is not specified, then the path specified config.json file should be used.

check for browser compatibility

We should check if the browser the gui is opened in is compatible with the WEBGUI and its dependencies (dojo, codemirror, jsplumb, jquery, etc.)

show in a popup the minimum required browser version only in case the used browser is not compatible with codechecker.

introduce permalinks on the web interface

it would be useful if the important views of the web GUI would have permalink URLs.
the following should have permalinks:-
-run-list
-bug list overview including filters
-view of a concrete defect
-a concrete page of the documentation and user guide

Then it would be possible the to send the the defect reports in email or use the browser back button.

add Clang SA configuration file

It should be possible to specify a config file to
CodeChecker check subcommand
where the checker specific configuration can be added.

Preferably in json format:

[  
   {  
      "checker_name":[  
         {  
            "parameter_name":"value"
         },
         {  
            "parameter_name":"value"
         }
      ]
   }
]

For example:

[  
   {  
      "NonPrivateDataChecker":[  
         {  
            "exclude_structs":"true"
         }
      ]
   }
]

do not log compiler wrapper scripts

introduce an env variable to the logger to log only the execution of elf binaries (gcc, g++ are binaries)

the name of the env variable should be ๐ŸŽฑ
CC_LOG_BIN_ONLY
default 1

../config/original_env.pickle is not writable

Codechecker check crashed with the following:

Traceback (most recent call last):
File "/Codechecker/cc_bin/CodeChecker", line 28, in
with open(original_env_file, 'wb') as env_save:
IOError: [Errno 13] Permission denied: '/Codechecker/cc_bin/../config/original_env.pickle'

Proposed Solution:
The binary package directory in general is not writable.
Use the /tmp directory for temp files.
for example /tmp/codechecker_[username]

support execution of clang tidy

CodeChecker can only run Clang SA, but there are many checkers implemented in Clang Tidy.

Codechecker shall be able to wrap
-config parameters
-checker enable/disable list
and parse the output of Clang tidy in exactly the same format as Clang SA

enable clang analyzer option pass through

introduce a new configuration parameter to
CodeChecker check
subcommand to pass through parameters to clang.

-e Pass extra parameters to clang.

this could be useful to specify parameters such as -analyzer-opt-analyze-headers or -analyzer-max-loop etc.

checker: when adding a new report do not check uniqueness based on the hash

when we add a new hit in the database, we check the uniqueness of the report based on the hash alone.
if there is a hash clash, then we do not add the report to the database.
however this could lead to missing reports when there is a hash clash. it is a problem especially when the bug is reported in the global namespace, because there is no named declaration context (and the filenanme is not in the hash).

check uniqueness based on hash first, then if there is a clash, check the checker name, file name and bug position.

change default cleanup behaviour

currently codechecker by default does not clean up the temporary plist files after the check, only if
'-c' clean argument is set
this should be changed to a new default behaviour:
by default the temporary files should be deleted during the check and only kept if it is explicitly set in the command line by a keep-temporary files option

introduce env variables for common commandline parameters

it would be useful to be possible to give command line parameters as env variables
this would make the command line shorter.

if command line is specified it should override env var and default settings:
default->env-var->command line (override sequence)

in case of enable/disable checker list: the default should be extended by either the env var or the command line param

these params should have env var equivalent:
-workspace
-dbport
-dbhost
-dbuser
-dbname
-enable/disable checker list
-viewport
-suppress file path

if the env var is speficied then the CodeChecker script should list their values when started.

database version mismatch message should be error level log

now can only be seen in debug mode.

[2048] <139634032555776> - report_server.run_server() [CC SERVER] - Creating new database schema done in 0
[2048] <139634032555776> - report_server.run_server() [CC SERVER] - Version mismatch. Expected database version: v4.0
[2048] <139634032555776> - report_server.run_server() [CC SERVER] - Version from the database is: v3.0
[2048] <139634032555776> - report_server.run_server() [CC SERVER] - Please update your database.
[1997] <139634032555776> - client.start_server() [CLIENT] - Waiting for checker server to start.
[1997] <139634032555776> - client.start_server() [CLIENT] - Waiting for checker server to start.
[1997] <139634032555776> - client.start_server() [CLIENT] - Waiting for checker server to start.
[1997] <139634032555776> - client.start_server() [CLIENT] - Failed to start checker server.

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.