Skip to content

Commit

Permalink
Merge pull request #4135 from bruntib/release-v6.23.1
Browse files Browse the repository at this point in the history
Release v6.23.1
  • Loading branch information
bruntib authored Dec 14, 2023
2 parents 02ad728 + f13b8cb commit 6b76822
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
20 changes: 14 additions & 6 deletions codechecker_common/review_status_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from codechecker_common.source_code_comment_handler import \
SourceCodeCommentHandler, SpellException, contains_codechecker_comment, \
SourceCodeComment, SourceCodeComments
from codechecker_common.util import path_for_fake_root


LOG = get_logger('system')
Expand Down Expand Up @@ -55,7 +56,7 @@ class ReviewStatusHandler:
'review_status',
'reason']

def __init__(self, source_root=''):
def __init__(self, source_root=""):
"""
TODO: What happens if multiple report directories are stored?
"""
Expand Down Expand Up @@ -316,15 +317,22 @@ def get_review_status_from_source(
logic where we take the first comment into account in case of ambiguity
or return "unreviewed" with a warning, like changed files.
"""
# The original file path is needed here, not the trimmed, because
# the source files are extracted as the original file path.
# TODO: Should original_path be strip('/') at store?
source_file_name = os.path.realpath(os.path.join(
self.__source_root, report.file.original_path))
if self.__source_root:
# sanitize paths like mass store run
source_file_name = path_for_fake_root(
report.file.original_path, self.__source_root)
else:
# in this branch we are operating on the original filesystem,
# and we need the path to the original file
source_file_name = os.path.realpath(os.path.join(
self.__source_root, report.file.original_path))

if source_file_name in report.changed_files:
return None

if not os.path.exists(source_file_name):
LOG.error(f"Source file '{source_file_name}' does not exist.")

if os.path.isfile(source_file_name):
src_comment_data = self.__parse_codechecker_review_comment(
source_file_name, report.line, report.checker_name)
Expand Down
5 changes: 3 additions & 2 deletions web/server/codechecker_server/api/mass_store_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ def get_missing_file_ids(report: Report) -> List[str]:
fixed_at = run_history_time

self.__check_report_count()
report_id = self.__add_report(
self.__add_report(
session, run_id, report, file_path_to_id,
review_status, detection_status, detected_at,
run_history_time, analysis_info, analyzer_name, fixed_at)
Expand All @@ -927,7 +927,8 @@ def get_missing_file_ids(report: Report) -> List[str]:
review_status.status
self.__already_added_report_hashes.add(report_path_hash)

LOG.debug("Storing report done. ID=%d", report_id)
LOG.debug(f"Storing report done. bug_hash:{report.report_hash}, " +
f"source_file:{report_file_path}")

return True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ export default {
const status = !(
isResolved ||
report.detectionStatus === DetectionStatus.OFF ||
report.detectionStatus === DetectionStatus.UNAVAILABLE ||
report.reviewData.status === ReviewStatus.FALSE_POSITIVE ||
report.reviewData.status === ReviewStatus.INTENTIONAL
) ? this.items.find(item => item.isOutstanding)
Expand Down Expand Up @@ -231,6 +233,8 @@ export default {
const status = !(
isResolved ||
this.report.detectionStatus === DetectionStatus.OFF ||
this.report.detectionStatus === DetectionStatus.UNAVAILABLE ||
this.report.reviewData.status === ReviewStatus.FALSE_POSITIVE ||
this.report.reviewData.status === ReviewStatus.INTENTIONAL
) ? this.items.find(item => item.isOutstanding)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,19 @@

<v-icon
v-else-if="item.isOutstanding"
title="Outstanding reports (review status is unreviewed or confirmed
and detection status is not resolved)"
title="Outstanding reports, that are potential bugs
(review status is unreviewed or confirmed and
detection status is new, unresolved or reopened)"
color="primary"
>
mdi-folder-lock-open
</v-icon>

<v-icon
v-else-if="!item.isOutstanding"
title="Closed reports (review status is false positive or intentional
or detection status is resolved)"
title="Closed reports, that are fixed bugs, suppressed reports
(false positive, intentional) or whose detection status is resolved,
off or unavailable."
color="primary"
>
mdi-folder-lock
Expand Down

0 comments on commit 6b76822

Please sign in to comment.