Skip to content

Commit

Permalink
refactor plist to plaintext formatting (parse)
Browse files Browse the repository at this point in the history
Plist parsing and formatting used by the old architecture is not
the way it should be handled now. It was not flexible and it was hard
to improve it.
It should be easier to test and setup the output formatting after the
changes.

Skip lists were not supported by the parse command, this
commit will add the skip files support for parse too.
  • Loading branch information
Gyorgy Orban committed Jan 29, 2018
1 parent 17fd848 commit d290f48
Show file tree
Hide file tree
Showing 5 changed files with 213 additions and 265 deletions.
20 changes: 0 additions & 20 deletions libcodechecker/analyze/analyzers/analyzer_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from libcodechecker.analyze.analyzers import config_handler_clangsa
from libcodechecker.analyze.analyzers import result_handler_base
from libcodechecker.analyze.analyzers import result_handler_clang_tidy
from libcodechecker.analyze.analyzers import result_handler_plist_to_stdout
from libcodechecker.logger import get_logger

LOG = get_logger('analyzer')
Expand Down Expand Up @@ -456,22 +455,3 @@ def construct_analyze_handler(buildaction,
res_handler.severity_map = severity_map
res_handler.skiplist_handler = skiplist_handler
return res_handler


def construct_parse_handler(buildaction,
output,
severity_map,
suppress_handler,
print_steps):
"""
Construct a result handler for parsing results in a human-readable format.
"""
res_handler = result_handler_plist_to_stdout.PlistToStdout(
buildaction,
output,
None)

res_handler.print_steps = print_steps
res_handler.severity_map = severity_map
res_handler.suppress_handler = suppress_handler
return res_handler
18 changes: 0 additions & 18 deletions libcodechecker/analyze/analyzers/result_handler_clang_tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from libcodechecker.analyze import tidy_output_converter
from libcodechecker.analyze.analyzers.result_handler_base \
import ResultHandler
from libcodechecker.analyze.analyzers.result_handler_plist_to_stdout \
import PlistToStdout
from libcodechecker.logger import get_logger

LOG = get_logger('report')
Expand Down Expand Up @@ -42,19 +40,3 @@ def postprocess_result(self):
LOG.debug_analyzer(self.analyzer_stdout)
tidy_stdout = self.analyzer_stdout.splitlines()
generate_plist_from_tidy_result(output_file, tidy_stdout)


class ClangTidyPlistToStdout(PlistToStdout):
"""
Print the clang tidy results to the standard output.
"""

def postprocess_result(self):
"""
Clang-tidy results are post processed to have the same format as the
clang static analyzer result files.
"""

output_file = self.analyzer_result_file
tidy_stdout = self.analyzer_stdout.splitlines()
generate_plist_from_tidy_result(output_file, tidy_stdout)
210 changes: 0 additions & 210 deletions libcodechecker/analyze/analyzers/result_handler_plist_to_stdout.py

This file was deleted.

Loading

0 comments on commit d290f48

Please sign in to comment.