Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli][server] Refactoring code for sarif support #3462

Merged
merged 1 commit into from
Nov 5, 2021

Conversation

csordasmarton
Copy link
Contributor

Closes #3451 and the first part of #1797.

The basic idea behind these changes is that in this patch we created a
general Report class which holds information about bugs what are needed
by the CodeChecker CLI and server. We introduced helper functions in this patch
to convert analyzer result files (for now only plist) to Report objects.
All the converters (html, gerrit, codeclimate, json, etc.) and report hash
generation modules will work on these Report objects.

This patch also tried to remove duplication between the different command
line subcommands (parse, diff, store etc.).

@csordasmarton csordasmarton added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands server 🖥️ refactoring 😡 ➡️ 🙂 Refactoring code. labels Oct 25, 2021
@csordasmarton csordasmarton added this to the release 6.18.0 milestone Oct 25, 2021
@csordasmarton csordasmarton requested a review from dkrupp as a code owner October 25, 2021 11:02
@csordasmarton csordasmarton force-pushed the sarif_support branch 9 times, most recently from 474c01b to 2cda6af Compare October 26, 2021 07:59
@csordasmarton csordasmarton force-pushed the sarif_support branch 5 times, most recently from 2c42211 to ce8c401 Compare November 3, 2021 13:00
analyzer/codechecker_analyzer/cmd/parse.py Outdated Show resolved Hide resolved
docs/tools/report-converter.md Outdated Show resolved Hide resolved
docs/tools/report-converter.md Show resolved Hide resolved
docs/tools/report-converter.md Outdated Show resolved Hide resolved
The basic idea behind these changes is that in this patch we created a
general `Report` class which holds information about bugs what are needed
by the CodeChecker CLI and server. We introduced helper functions in this patch
to convert analyzer result files (for now only plist) to Report objects.
All the converters (html, gerrit, codeclimate, json, etc.) and report hash
generation modules will work on these Report objects.

This patch also tried to remove duplication between the different command
line subcommands (parse, diff, store etc.).
@csordasmarton csordasmarton merged commit 85dd52d into Ericsson:master Nov 5, 2021
extract added a commit to extract/codechecker that referenced this pull request Nov 19, 2021
After commit Ericsson#3462 the links in the README.md broke in the Common Tools section. This commit removes those links as they seem to no longer be necessary.
@csordasmarton
@csordasmarton
Copy link
Contributor Author

The json output of the CodeChecker parse command was not stable enough and the structure was very similar to the plist structure. Our plan is to support reading/parsing/storing of multiple analyzer output types not only plist but for example sarif format as well (http://docs.oasis-open.org/sarif/sarif/v2.0/csprd01/sarif-v2.0-csprd01.html).

Yes, it's our mistake that we forgot to mention it in the release notes. So sorry for that :/

@csordasmarton csordasmarton added the WARN ⚠️: Backward compatibility breaker! MIND THE GAP! Merging this patch will mess up compatibility with the previous releases! label Nov 30, 2021
csordasmarton added a commit to csordasmarton/codechecker that referenced this pull request Jan 11, 2022
In the `6.18.0` release Ericsson#3462 patch introduced a bug that not all of the
control points are stored to the server, because the plist format what the
report converter produced and the plist parser expected was invalid:
- `range` key was used instead of `ranges`.
- Control events are not stored as separated items but as a single control event.
csordasmarton added a commit that referenced this pull request Jan 12, 2022
In the `6.18.0` release #3462 patch introduced a bug that not all of the
control points are stored to the server, because the plist format what the
report converter produced and the plist parser expected was invalid:
- `range` key was used instead of `ranges`.
- Control events are not stored as separated items but as a single control event.
steakhal pushed a commit to steakhal/codechecker that referenced this pull request Jan 15, 2022
In the `6.18.0` release Ericsson#3462 patch introduced a bug that not all of the
control points are stored to the server, because the plist format what the
report converter produced and the plist parser expected was invalid:
- `range` key was used instead of `ranges`.
- Control events are not stored as separated items but as a single control event.
@csordasmarton csordasmarton deleted the sarif_support branch January 28, 2022 11:03
extract added a commit to extract/codechecker that referenced this pull request Aug 17, 2022
After commit Ericsson#3462 the links in the README.md broke in the Common Tools section. This commit changes those to the correct link.
bruntib pushed a commit that referenced this pull request Aug 17, 2022
[doc] fix dead links in README.md

After commit #3462 the links in the README.md broke in the Common Tools section. This commit fixes those links as they seem to be moved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands refactoring 😡 ➡️ 🙂 Refactoring code. server 🖥️ WARN ⚠️: Backward compatibility breaker! MIND THE GAP! Merging this patch will mess up compatibility with the previous releases!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exporting multiple directories to html results in missing html files
2 participants