-
Notifications
You must be signed in to change notification settings - Fork 384
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
[server] Store, show and filter by analyzer name #2836
[server] Store, show and filter by analyzer name #2836
Conversation
e063cca
to
e921a26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I try rebuilding the package and starting the webserver with an existing database, I get an exception from alembic and the server doesn't start.
docs/web/user_guide.md
Outdated
Filter results by analyzer names. The analyzer name | ||
can contain multiple * quantifiers which matches any | ||
number of characters (zero or more). So for example | ||
"clang*" will matches "clangsa" and "clang-tidy". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filter results by analyzer names. The analyzer name | |
can contain multiple * quantifiers which matches any | |
number of characters (zero or more). So for example | |
"clang*" will matches "clangsa" and "clang-tidy". | |
Filter results by analyzer names. The analyzer name | |
can contain multiple * quantifiers which match any | |
number of characters (zero or more). So for example | |
"clang*" will match "clangsa" and "clang-tidy". |
codechecker_common/report.py
Outdated
@@ -25,7 +25,7 @@ class Report(object): | |||
from the path section for easier skip/suppression handling | |||
and result processing. | |||
""" | |||
def __init__(self, main, bugpath, files): | |||
def __init__(self, main, bugpath, files, metadata): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metadata
could have None
as default value. It is called with None
several times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set this parameter default value to None.
By the way we call this with None in two places but in the following way:
metadata = None
Report(..., metadata)
So from this I can see explicitly that no metadata is given to the Report class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Does this two-line version have documentation reasons instead of Report(..., None)
? You may consider using Report(..., metadata=None)
if you want to see parameter name at function call.
e921a26
to
05760b9
Compare
ff4bcab
to
497e3e2
Compare
|
||
limit = verify_limit_range(limit) | ||
|
||
results = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this contain analyzers as keys and 0 as value? Does it work if empty dict is returned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will work, for example we do the same thing in getSeverityCounts
API function.
For example if the database is empty, so there isn't any report in the database then this function will return an empty dictionary.
This function returns a dictionary where the keys are analyzer names which can be found in the database.
497e3e2
to
3c733ee
Compare
942f6b5
to
fda1fa4
Compare
fda1fa4
to
fe4d9f3
Compare
Here is an overview of what got changed by this pull request: Issues
======
- Added 1
Complexity increasing per file
==============================
- web/server/codechecker_server/migrations/report/versions/af5d8a21c1e4_add_analyzer_name_for_report.py 1
- web/client/codechecker_client/cmd_line_client.py 1
- web/server/codechecker_server/api/report_server.py 2
Clones added
============
- web/server/codechecker_server/api/report_server.py 6
See the complete overview on Codacy |
resolves #2717