diff --git a/infer/bin/inferlib.py b/infer/bin/inferlib.py index 9f9ecb9e5..434f83076 100644 --- a/infer/bin/inferlib.py +++ b/infer/bin/inferlib.py @@ -308,7 +308,7 @@ def print_errors(csv_report, bugs_out): kind = row[utils.CSV_INDEX_KIND] line = row[utils.CSV_INDEX_LINE] error_type = row[utils.CSV_INDEX_TYPE] - msg = utils.remove_bucket(row[utils.CSV_INDEX_QUALIFIER]) + msg = row[utils.CSV_INDEX_QUALIFIER] print_and_write( file_out, '{0}:{1}: {2}: {3}\n {4}\n'.format( @@ -459,6 +459,7 @@ class Infer: '-dotty', '-print_types', '-trace_error', + '-print_buckets', # '-notest', ] diff --git a/infer/bin/utils.py b/infer/bin/utils.py index 8753ec685..3ca92ee11 100644 --- a/infer/bin/utils.py +++ b/infer/bin/utils.py @@ -101,12 +101,6 @@ def error(msg): print(msg, file=sys.stderr) -def remove_bucket(bug_message): - """ Remove anything from the beginning if the message that - looks like a bucket """ - return re.sub(r'(^\[[a-zA-Z0-9]*\])', '', bug_message, 1) - - def get_cmd_in_bin_dir(binary_name): # this relies on the fact that utils.py is located in infer/bin return os.path.join( diff --git a/infer/src/backend/config.ml b/infer/src/backend/config.ml index e1f8292bb..910204c33 100644 --- a/infer/src/backend/config.ml +++ b/infer/src/backend/config.ml @@ -318,10 +318,10 @@ let optimistic_cast = ref false let filter_buckets = ref false (** if true, show buckets in textual description of errors *) -let show_buckets = ref true +let show_buckets = ref false (** if true, show memory leak buckets in textual description of errors *) -let show_ml_buckets = ref true +let show_ml_buckets = ref false (** if true, print cfg nodes in the dot file that are not defined in that file *) let dotty_cfg_libs = ref true diff --git a/infer/src/backend/inferanalyze.ml b/infer/src/backend/inferanalyze.ml index fd88c2e35..a6f07c94d 100644 --- a/infer/src/backend/inferanalyze.ml +++ b/infer/src/backend/inferanalyze.ml @@ -172,7 +172,9 @@ let arg_desc = "-tracing", Arg.Unit (fun () -> Config.report_runtime_exceptions := true), None, "Report error traces for runtime exceptions (Only for Java)"; "-allow_specs_cleanup", Arg.Unit (fun () -> allow_specs_cleanup := true), None, - "Allow to remove existing specs before running analysis when it's not incremental" + "Allow to remove existing specs before running analysis when it's not incremental"; + "-print_buckets", Arg.Unit (fun() -> Config.show_buckets := true; Config.show_ml_buckets := true), None, + "Add buckets to issue descriptions, useful when developing infer" ] in Arg2.create_options_desc false "Reserved Options: Experimental features, use with caution!" desc in base_arg @ reserved_arg