Giter Club home page Giter Club logo

meta-codechecker's Introduction

meta-codechecker

A Layer to support CodeChecker as a frontent to clang static analysis

usage

This layer exposes a bbclass and the recipes needed to support inclusion of the tooling. Note that meta-clang is a requirement.

In a recipe enable:

To enable the layer within a single recipe, do add

inherit codechecker
CODECHECKER_ENABLED = "1"

In conf/local.conf

INHERIT += "codechecker"
CODECHECKER_ENABLED = "1"

options:

To generate a static HTML site as report do add:

CODECHECKER_REPORT_HTML = "1"

To generate a codeclimate compatible report do add:

CODECHECKER_REPORT_CODECLIMATE = "1"

The output will be in tmp/deploy/CodeChecker/*

To upload the results to the CodeChecker webserver (e.g. docker container) add:

CODECHECKER_REPORT_STORE = "1"
CODECHECKER_REPORT_HOST = "http://yourcodecheckerhost:8001/"
CODECHECKER_REPORT_ENDPOINT = "myproductname"
# ENDPOINT cannot have '.' or '+' or ' '  in the name !
#
# optionally have the endpoint created
#CODECHECKER_REPORT_ENDPOINT_CREATE = "1"

Note: The URL of the product to store the results for, in the format of 'http[s]://]host:port/'. (default: localhost:8001/Default)

Note: this was tested against the docker container docker pull codechecker/codechecker-web:6.15.2

output location

The output will be in:

check tmp/deploy/CodeChecker/*

meta-codechecker's People

Contributors

bachp avatar dl9pf avatar samdolt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

meta-codechecker's Issues

move or delete dunfell branch

#11 restored compatibility with dunfell on current master branch.
However dunfell branch still points to old commit from over a year ago.
The branch should be moved to latest master (and keep being moved as master is being updated) or maybe removed to avoid the moving overhead.

Analysis in CodeChecker fails on AArch64

I tried a yocto build of R-Car Gen3 using meta-codechecker.
Build succeeded. However, many errors were counted in the Analyzer Statistics of Codechecker.

From the do_codecheckeranalyse log, it appears that clang does not support the "-mtune=cortex-a57.cortex-a53" flag and that analyzing has failed. An example is shown below.

...
[INFO 2021-09-08 09:36] - Starting static analysis ...
[ERROR 2021-09-08 09:36] - Analyzing inffast.c with clang-tidy  failed!
[ERROR 2021-09-08 09:36] - 
error: the clang compiler does not support '-mtune=cortex-a57.cortex-a53' [clang-diagnostic-error]

[ERROR 2021-09-08 09:36] - 
1 error generated.
Error while processing /data/bsp/build/tmp/work/aarch64-poky-linux/zlib/1.2.11-r0/zlib-1.2.11/inffast.c.
Found compiler error(s).

[ERROR 2021-09-08 09:36] - Analyzing adler32.c with clang-tidy  failed!
[ERROR 2021-09-08 09:36] - 
error: the clang compiler does not support '-mtune=cortex-a57.cortex-a53' [clang-diagnostic-error]

[ERROR 2021-09-08 09:36] - 
1 error generated.
Error while processing /data/bsp/build/tmp/work/aarch64-poky-linux/zlib/1.2.11-r0/zlib-1.2.11/adler32.c.
Found compiler error(s).
...

Do you have any good ideas for a successful analysis?

[kirkstone] switch from distutils3-base.bbclass to the new setuptools3.bbclass

Currently we are use manually pip to install codechecker:

# CodeChecker use a native namespace package and can't be installed using
# setup.py install, so we can't simply ihnerit from setuptools3
# Instead, we must install using pip install .
# This code is inspired by the distutils3.bbclass

Next version of Yocto kirkstone now use pip instead of setup.py, as Python deprecated setup.py upstream.

The old behaviour is now in setuptools3_legacy.bbclass. The new setuptools3.bbclass use pip under the hood and should work with codechecker. This would allow us to drop our custom do_install step.

See this thread for more info: https://lore.kernel.org/all/CAAnfSTvjPeyJHjd-FiYoXmxPMaXM0AH9KMXm6n5ooJNfQp80Sw@mail.gmail.com/

This will also remove this warning on kirkstone:
WARNING: distutils-common-base.bbclass is deprecated, please use setuptools3-base.bbclass instead

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.