Summary: Hopefully no one uses this. This is in Python and we'd like to get rid of it. Easy enough to either re-implement if needed or to be re-implemented by a third party. Reviewed By: ngorogiannis Differential Revision: D20626344 fbshipit-source-id: 484022482master
parent
8d6153d949
commit
c73feb82b4
@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env python2.7
|
||||
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from inferlib import issues, utils
|
||||
|
||||
arg_parser = argparse.ArgumentParser(add_help=False)
|
||||
arg_parser.add_argument('--issues-json', metavar='<file>', required=True,
|
||||
help='Location of the json report')
|
||||
arg_parser.add_argument('--issues-txt', metavar='<file>',
|
||||
help='Location of the text report')
|
||||
arg_parser.add_argument('--issues-xml', metavar='<file>',
|
||||
help='Location of the xml report (ignored for now)')
|
||||
arg_parser.add_argument('--pmd-xml', action='store_true',
|
||||
help='Output issues in (PMD) XML format.')
|
||||
arg_parser.add_argument('--project-root', metavar='<directory>', required=True,
|
||||
help='Location of the project root')
|
||||
arg_parser.add_argument('--quiet', action='store_true',
|
||||
help='Silence console output.')
|
||||
arg_parser.add_argument('--results-dir', metavar='<directory>', required=True,
|
||||
help='Location of the results directory')
|
||||
|
||||
|
||||
def main():
|
||||
sys_argv = map(utils.decode, sys.argv)
|
||||
args = arg_parser.parse_args(sys_argv[1:])
|
||||
issues.print_and_save_errors(args.results_dir, args.project_root,
|
||||
args.issues_json, args.issues_txt,
|
||||
args.pmd_xml, console_out=not args.quiet)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -1,20 +0,0 @@
|
||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
TESTS_DIR = ../..
|
||||
|
||||
CODETOANALYZE_DIR = ../codetoanalyze
|
||||
|
||||
CLANG_OPTIONS = -c
|
||||
INFER_OPTIONS = --project-root $(CODETOANALYZE_DIR) --pmd-xml
|
||||
INFERPRINT_OPTIONS = --issues-tests
|
||||
|
||||
SOURCES = $(CODETOANALYZE_DIR)/hello.c
|
||||
|
||||
include $(TESTS_DIR)/clang.make
|
||||
|
||||
issues.exp.test: infer-out/report.json
|
||||
# grab only a few interesting fields from the xml to prevent flakiness
|
||||
$(QUIET)grep --only-matching -e ' \(name\|method\|rule\)="[^"]*"' infer-out/report.xml > $@
|
@ -1,3 +0,0 @@
|
||||
name="hello.c"
|
||||
method="test"
|
||||
rule="NULL_DEREFERENCE"
|
Loading…
Reference in new issue