diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt index 961c944a7..61d6f833b 100644 --- a/infer/man/man1/infer-full.txt +++ b/infer/man/man1/infer-full.txt @@ -378,7 +378,7 @@ OPTIONS COMPARING_FLOAT_FOR_EQUALITY (enabled by default), COMPONENT_FACTORY_FUNCTION (enabled by default), COMPONENT_FILE_CYCLOMATIC_COMPLEXITY (enabled by default), - COMPONENT_FILE_LINE_COUNT (enabled by default), + COMPONENT_FILE_LINE_COUNT (disabled by default), COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS (enabled by default), COMPONENT_WITH_MULTIPLE_FACTORY_METHODS (enabled by default), COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS (enabled by default), @@ -483,8 +483,8 @@ OPTIONS RETURN_VALUE_IGNORED (disabled by default), SHELL_INJECTION (enabled by default), SHELL_INJECTION_RISK (enabled by default), - SKIP_FUNCTION (enabled by default), - SKIP_POINTER_DEREFERENCE (enabled by default), + SKIP_FUNCTION (disabled by default), + SKIP_POINTER_DEREFERENCE (disabled by default), SQL_INJECTION (enabled by default), SQL_INJECTION_RISK (enabled by default), STACK_VARIABLE_ADDRESS_ESCAPE (disabled by default), diff --git a/infer/man/man1/infer-report.txt b/infer/man/man1/infer-report.txt index aedf32588..ccc7cc801 100644 --- a/infer/man/man1/infer-report.txt +++ b/infer/man/man1/infer-report.txt @@ -108,7 +108,7 @@ OPTIONS COMPARING_FLOAT_FOR_EQUALITY (enabled by default), COMPONENT_FACTORY_FUNCTION (enabled by default), COMPONENT_FILE_CYCLOMATIC_COMPLEXITY (enabled by default), - COMPONENT_FILE_LINE_COUNT (enabled by default), + COMPONENT_FILE_LINE_COUNT (disabled by default), COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS (enabled by default), COMPONENT_WITH_MULTIPLE_FACTORY_METHODS (enabled by default), COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS (enabled by default), @@ -213,8 +213,8 @@ OPTIONS RETURN_VALUE_IGNORED (disabled by default), SHELL_INJECTION (enabled by default), SHELL_INJECTION_RISK (enabled by default), - SKIP_FUNCTION (enabled by default), - SKIP_POINTER_DEREFERENCE (enabled by default), + SKIP_FUNCTION (disabled by default), + SKIP_POINTER_DEREFERENCE (disabled by default), SQL_INJECTION (enabled by default), SQL_INJECTION_RISK (enabled by default), STACK_VARIABLE_ADDRESS_ESCAPE (disabled by default), diff --git a/infer/man/man1/infer.txt b/infer/man/man1/infer.txt index 68185e241..9aeb0dbea 100644 --- a/infer/man/man1/infer.txt +++ b/infer/man/man1/infer.txt @@ -378,7 +378,7 @@ OPTIONS COMPARING_FLOAT_FOR_EQUALITY (enabled by default), COMPONENT_FACTORY_FUNCTION (enabled by default), COMPONENT_FILE_CYCLOMATIC_COMPLEXITY (enabled by default), - COMPONENT_FILE_LINE_COUNT (enabled by default), + COMPONENT_FILE_LINE_COUNT (disabled by default), COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS (enabled by default), COMPONENT_WITH_MULTIPLE_FACTORY_METHODS (enabled by default), COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS (enabled by default), @@ -483,8 +483,8 @@ OPTIONS RETURN_VALUE_IGNORED (disabled by default), SHELL_INJECTION (enabled by default), SHELL_INJECTION_RISK (enabled by default), - SKIP_FUNCTION (enabled by default), - SKIP_POINTER_DEREFERENCE (enabled by default), + SKIP_FUNCTION (disabled by default), + SKIP_POINTER_DEREFERENCE (disabled by default), SQL_INJECTION (enabled by default), SQL_INJECTION_RISK (enabled by default), STACK_VARIABLE_ADDRESS_ESCAPE (disabled by default), diff --git a/infer/src/base/IssueType.ml b/infer/src/base/IssueType.ml index 1cd7d0c1f..dafa4e2df 100644 --- a/infer/src/base/IssueType.ml +++ b/infer/src/base/IssueType.ml @@ -184,7 +184,7 @@ let component_file_cyclomatic_complexity = register_from_string "COMPONENT_FILE_CYCLOMATIC_COMPLEXITY" -let component_file_line_count = register_from_string "COMPONENT_FILE_LINE_COUNT" +let component_file_line_count = register_from_string ~enabled:false "COMPONENT_FILE_LINE_COUNT" let component_initializer_with_side_effects = register_from_string "COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS" @@ -297,7 +297,7 @@ let eradicate_meta_class_is_nullsafe = ~enabled:false -(* Class is either: +(* Class is either: - has at least one nullability issue. - has at least one (currently possibly hidden) issue in order to be marked as @Nullsafe. *) @@ -436,9 +436,9 @@ let return_statement_missing = register_from_string "RETURN_STATEMENT_MISSING" let return_value_ignored = register_from_string ~enabled:false "RETURN_VALUE_IGNORED" -let skip_function = register_from_string "SKIP_FUNCTION" +let skip_function = register_from_string ~enabled:false "SKIP_FUNCTION" -let skip_pointer_dereference = register_from_string "SKIP_POINTER_DEREFERENCE" +let skip_pointer_dereference = register_from_string ~enabled:false "SKIP_POINTER_DEREFERENCE" let shell_injection = register_from_string "SHELL_INJECTION" diff --git a/infer/src/integration/JsonReports.ml b/infer/src/integration/JsonReports.ml index 7f36ed2e7..fd89fd05b 100644 --- a/infer/src/integration/JsonReports.ml +++ b/infer/src/integration/JsonReports.ml @@ -59,27 +59,22 @@ let loc_trace_to_jsonbug_record trace_list ekind = record_list -let should_report (issue_kind : Exceptions.severity) issue_type error_desc eclass = +let should_report issue_type error_desc eclass = if (not Config.filtering) || Exceptions.equal_err_class eclass Exceptions.Linters then true else - let issue_kind_is_blacklisted = - match issue_kind with Info -> true | Advice | Error | Like | Warning -> false - in - if issue_kind_is_blacklisted then false - else - let issue_type_is_null_deref = - let null_deref_issue_types = - let open IssueType in - [ field_not_null_checked - ; null_dereference - ; parameter_not_null_checked - ; premature_nil_termination - ; empty_vector_access - ; biabd_use_after_free ] - in - List.mem ~equal:IssueType.equal null_deref_issue_types issue_type + let issue_type_is_null_deref = + let null_deref_issue_types = + let open IssueType in + [ field_not_null_checked + ; null_dereference + ; parameter_not_null_checked + ; premature_nil_termination + ; empty_vector_access + ; biabd_use_after_free ] in - if issue_type_is_null_deref then Localise.error_desc_is_reportable_bucket error_desc else true + List.mem ~equal:IssueType.equal null_deref_issue_types issue_type + in + if issue_type_is_null_deref then Localise.error_desc_is_reportable_bucket error_desc else true (* The reason an issue should be censored (that is, not reported). The empty @@ -171,7 +166,7 @@ module JsonIssuePrinter = MakeJsonListPrinter (struct if error_filter source_file err_key.err_name && should_report_source_file - && should_report err_key.severity err_key.err_name err_key.err_desc err_data.err_class + && should_report err_key.err_name err_key.err_desc err_data.err_class then let severity = Exceptions.severity_string err_key.severity in let bug_type = err_key.err_name.IssueType.unique_id in