Skip to main content

Python module for creating Code Insight Reports based on llvm-based diagnostics output.

Installation

$ pip install bitbucket-code-insight-reporter

Example

Example LLVM output:

test.cpp:6:5: warning: use a trailing return type for this function [modernize-use-trailing-return-type]
int main() {
~~~ ^
auto       -> int
test.cpp:11:9: warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
    if (hello + world == "")
        ^~~~~~~~~~~~~~~~~~~
        hello + world.empty()
../include/c++/v1/string:990:10: note: method 'basic_string'::empty() defined here
    bool empty() const _NOEXCEPT {return size() == 0;}
        ^
test.cpp:11:29: warning: statement should be inside braces [readability-braces-around-statements]
    if (hello + world == "")
                            ^
                            {
test.cpp:15:9: warning: use std::make_unique instead [modernize-make-unique]
    ptr.reset(new std::string{ "xyz" });
    ~^~~~~ ~~~~~~~~~~~~~~~~       ~
        = std::make_unique<std::string>
test.cpp:16:15: warning: use nullptr [modernize-use-nullptr]
    ptr.reset(NULL);
            ^~~~
            nullptr
test.cpp:19:5: warning: use range-based for loop instead [modernize-loop-convert]
    for (std::vector<int>::iterator it = vec.begin(); it != vec.end(); ++it)
    ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        (int & it : vec)
test.cpp:19:10: warning: use auto when declaring iterators [modernize-use-auto]
    for (std::vector<int>::iterator it = vec.begin(); it != vec.end(); ++it)
        ^
note: this fix will not be applied because it overlaps with another fix
test.cpp:19:77: warning: statement should be inside braces [readability-braces-around-statements]
    for (std::vector<int>::iterator it = vec.begin(); it != vec.end(); ++it)
                                                                            ^
                                                                            {

Example execution

code_insight_reporter generate --id clang_format --title "Clang Format" --details "Overview of all warnings reported by Clang Format" --reporter "Bob Builder" --llvm-logging ./path/to/logging.out  --output ./path/to/report.json
code_insight_reporter report--bitbucket-server https://bitbucket.url.com --username bob --password builder --bitbucket-project BOB --repository-slug builder --commit-hash 1234567890 --report-file ./path/to/report.json

Usage

Usage: code_insight_reporter [OPTIONS] COMMAND [ARGS]...

Options:
--verbose  Enable verbose output
--help     Show this message and exit.

Commands:
generate
report
Usage: code_insight_reporter report [OPTIONS]

Options:
--bitbucket-server TEXT   URL for the BitBucket server  [required]
--username TEXT           Username associated with BitBucket  [required]
--password TEXT           Password associated with BitBucket  [required]
--bitbucket-project TEXT  BitBucket project name  [required]
--repository-slug TEXT    BitBucket repository slug name  [required]
--commit-hash TEXT        Commit Hash to associate the Code Insights Report
                            with  [required]

--report-file FILENAME    Code Insights Report identifier  [required]
--help                    Show this message and exit.
Usage: code_insight_reporter generate [OPTIONS]

Options:
--id TEXT            Unique identifier for the report  [required]
--title TEXT         Humand readable title for the Code Insight report
                    [required]

--details TEXT       Additional details to share withing the Code Insight
                    report

--reporter TEXT      Reference to the reporter of the Code Insight Report
--link TEXT          Link towards an external report
--logo-url TEXT      Link towards an image to be shown in the Code Insight
                    report

--workspace TEXT     Absolute path towards the root of the repository. This
                    will be stripped from the file paths in the LLVM
                    logging.

--llvm-logging TEXT  Path pointing to logging file containing llvm
                    diagnostics messages  [required]

--output FILENAME    Path towards the output file  [required]
--help               Show this message and exit.

Release files for bitbucket-code-insight-reporter 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bitbucket-code-insight-reporter 0.2.0
File Size Uploaded
bitbucket-code-insight-reporter-0.2.0.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bitbucket-code-insight-reporter 0.2.0
File Interpreter ABI Platform
bitbucket_code_insight_reporter-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / bitbucket-code-insight-reporter-0.2.0.tar.gz

Download URL bitbucket-code-insight-reporter-0.2.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
915205d9572da6edc87d73e607b199bdb623ff3518b3575d8719c56173847ccc
BLAKE2b-256 checksum
How to use checksums
aa28089feb49c7e7fe588a505fcd34c70c391e36a93c48a695214d6781002906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / bitbucket_code_insight_reporter-0.2.0-py3-none-any.whl

Download URL bitbucket_code_insight_reporter-0.2.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e6b0bd3271ea739859a379d85a8182db3eb423bd887935c2e92642c15ba02cd
BLAKE2b-256 checksum
How to use checksums
a6ee0fbe767195f8403a4504eb70a524cf1ced8317d26ad07ff4be3ddfe162f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page