From 6d1d04dd920c3dd79fa5c54170e50c42538d8a18 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Wed, 12 Jun 2024 09:27:03 -0700 Subject: [PATCH] [config] update a few defaults Summary: - kotlin support is not experimental and we should not recommend against using it - `--pulse-force-continue` is actively used so not only for debugging (next diff proposes to make it the default) - config impact (not strict) can be enabled by default since the checker itself is not - PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST and PULSE_REFERENCE_STABILITY seem mature enough for the prime time Reviewed By: geralt-encore Differential Revision: D58467605 fbshipit-source-id: 536e4e4f7529bc24a56afe0abed7d40870f8694d --- infer/man/man1/infer-capture.txt | 5 ++--- infer/man/man1/infer-full.txt | 15 ++++++--------- infer/man/man1/infer-report.txt | 6 +++--- infer/man/man1/infer.txt | 11 +++++------ infer/src/base/Config.ml | 7 +++---- infer/src/base/IssueType.ml | 6 +++--- website/static/man/next/infer-capture.1.html | 7 +++---- website/static/man/next/infer-report.1.html | 6 +++--- website/static/man/next/infer.1.html | 13 ++++++------- 9 files changed, 34 insertions(+), 42 deletions(-) diff --git a/infer/man/man1/infer-capture.txt b/infer/man/man1/infer-capture.txt index de7172445dd..006ada41d03 100644 --- a/infer/man/man1/infer-capture.txt +++ b/infer/man/man1/infer-capture.txt @@ -388,9 +388,8 @@ JAVA OPTIONS The version of Java being used. Set it to your Java version if mvn is failing. - --kotlin-capture - Activates: Enable Kotlin capture (experimental, do not use). - (Conversely: --no-kotlin-capture) + --no-kotlin-capture + Deactivates: Enable Kotlin capture. (Conversely: --kotlin-capture) --no-mask-sawja-exceptions Deactivates: Mask exceptions thrown by Sawja/Javalib during Java diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt index a9cb9da19f2..4477d2def0b 100644 --- a/infer/man/man1/infer-full.txt +++ b/infer/man/man1/infer-full.txt @@ -607,7 +607,7 @@ OPTIONS CLASS_CAST_EXCEPTION (disabled by default), CONDITION_ALWAYS_FALSE (disabled by default), CONDITION_ALWAYS_TRUE (disabled by default), - CONFIG_IMPACT (disabled by default), + CONFIG_IMPACT (enabled by default), CONFIG_IMPACT_STRICT (disabled by default), CONFIG_USAGE (disabled by default), CONSTANT_ADDRESS_DEREFERENCE (disabled by default), @@ -705,7 +705,7 @@ OPTIONS PULSE_DICT_MISSING_KEY (disabled by default), PULSE_DYNAMIC_TYPE_MISMATCH (disabled by default), PULSE_READONLY_SHARED_PTR_PARAM (enabled by default), - PULSE_REFERENCE_STABILITY (disabled by default), + PULSE_REFERENCE_STABILITY (enabled by default), PULSE_RESOURCE_LEAK (enabled by default), PULSE_TRANSITIVE_ACCESS (enabled by default), PULSE_UNAWAITED_AWAITABLE (enabled by default), @@ -713,7 +713,7 @@ OPTIONS PULSE_UNINITIALIZED_VALUE (enabled by default), PULSE_UNNECESSARY_COPY (enabled by default), PULSE_UNNECESSARY_COPY_ASSIGNMENT (enabled by default), - PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (disabled by default), + PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (enabled by default), PULSE_UNNECESSARY_COPY_ASSIGNMENT_MOVABLE (enabled by default), PULSE_UNNECESSARY_COPY_INTERMEDIATE (enabled by default), PULSE_UNNECESSARY_COPY_INTERMEDIATE_CONST (disabled by @@ -1042,9 +1042,8 @@ OPTIONS failure (Conversely: --no-keep-going) See also infer-analyze(1) and infer-capture(1). - --kotlin-capture - Activates: Enable Kotlin capture (experimental, do not use). - (Conversely: --no-kotlin-capture) + --no-kotlin-capture + Deactivates: Enable Kotlin capture. (Conversely: --kotlin-capture) See also infer-capture(1). --lineage @@ -3034,9 +3033,7 @@ INTERNAL OPTIONS an unknown function. (Note that if the callee had latent issues, those keep being surfaced, as appropriate.) Activating this option will increase the coverage of code that is analyzed, but may - introduce false positives. It is intended to be used for - debugging, to quickly assess if a false negative may be caused by - lack of coverage. (Conversely: --no-pulse-force-continue) + introduce false positives. (Conversely: --no-pulse-force-continue) --no-pulse-havoc-arguments Deactivates: Heuristically havoc arguments to unknown functions. diff --git a/infer/man/man1/infer-report.txt b/infer/man/man1/infer-report.txt index f9ce9dc6ecd..91846c39da1 100644 --- a/infer/man/man1/infer-report.txt +++ b/infer/man/man1/infer-report.txt @@ -136,7 +136,7 @@ OPTIONS CLASS_CAST_EXCEPTION (disabled by default), CONDITION_ALWAYS_FALSE (disabled by default), CONDITION_ALWAYS_TRUE (disabled by default), - CONFIG_IMPACT (disabled by default), + CONFIG_IMPACT (enabled by default), CONFIG_IMPACT_STRICT (disabled by default), CONFIG_USAGE (disabled by default), CONSTANT_ADDRESS_DEREFERENCE (disabled by default), @@ -234,7 +234,7 @@ OPTIONS PULSE_DICT_MISSING_KEY (disabled by default), PULSE_DYNAMIC_TYPE_MISMATCH (disabled by default), PULSE_READONLY_SHARED_PTR_PARAM (enabled by default), - PULSE_REFERENCE_STABILITY (disabled by default), + PULSE_REFERENCE_STABILITY (enabled by default), PULSE_RESOURCE_LEAK (enabled by default), PULSE_TRANSITIVE_ACCESS (enabled by default), PULSE_UNAWAITED_AWAITABLE (enabled by default), @@ -242,7 +242,7 @@ OPTIONS PULSE_UNINITIALIZED_VALUE (enabled by default), PULSE_UNNECESSARY_COPY (enabled by default), PULSE_UNNECESSARY_COPY_ASSIGNMENT (enabled by default), - PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (disabled by default), + PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (enabled by default), PULSE_UNNECESSARY_COPY_ASSIGNMENT_MOVABLE (enabled by default), PULSE_UNNECESSARY_COPY_INTERMEDIATE (enabled by default), PULSE_UNNECESSARY_COPY_INTERMEDIATE_CONST (disabled by diff --git a/infer/man/man1/infer.txt b/infer/man/man1/infer.txt index 4ed883d624e..01fa34fbb7b 100644 --- a/infer/man/man1/infer.txt +++ b/infer/man/man1/infer.txt @@ -607,7 +607,7 @@ OPTIONS CLASS_CAST_EXCEPTION (disabled by default), CONDITION_ALWAYS_FALSE (disabled by default), CONDITION_ALWAYS_TRUE (disabled by default), - CONFIG_IMPACT (disabled by default), + CONFIG_IMPACT (enabled by default), CONFIG_IMPACT_STRICT (disabled by default), CONFIG_USAGE (disabled by default), CONSTANT_ADDRESS_DEREFERENCE (disabled by default), @@ -705,7 +705,7 @@ OPTIONS PULSE_DICT_MISSING_KEY (disabled by default), PULSE_DYNAMIC_TYPE_MISMATCH (disabled by default), PULSE_READONLY_SHARED_PTR_PARAM (enabled by default), - PULSE_REFERENCE_STABILITY (disabled by default), + PULSE_REFERENCE_STABILITY (enabled by default), PULSE_RESOURCE_LEAK (enabled by default), PULSE_TRANSITIVE_ACCESS (enabled by default), PULSE_UNAWAITED_AWAITABLE (enabled by default), @@ -713,7 +713,7 @@ OPTIONS PULSE_UNINITIALIZED_VALUE (enabled by default), PULSE_UNNECESSARY_COPY (enabled by default), PULSE_UNNECESSARY_COPY_ASSIGNMENT (enabled by default), - PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (disabled by default), + PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (enabled by default), PULSE_UNNECESSARY_COPY_ASSIGNMENT_MOVABLE (enabled by default), PULSE_UNNECESSARY_COPY_INTERMEDIATE (enabled by default), PULSE_UNNECESSARY_COPY_INTERMEDIATE_CONST (disabled by @@ -1042,9 +1042,8 @@ OPTIONS failure (Conversely: --no-keep-going) See also infer-analyze(1) and infer-capture(1). - --kotlin-capture - Activates: Enable Kotlin capture (experimental, do not use). - (Conversely: --no-kotlin-capture) + --no-kotlin-capture + Deactivates: Enable Kotlin capture. (Conversely: --kotlin-capture) See also infer-capture(1). --lineage diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 4f4920b46ff..8dabdf4f1a8 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -1968,9 +1968,9 @@ and jobs = and kotlin_capture = - CLOpt.mk_bool ~long:"kotlin-capture" ~default:false + CLOpt.mk_bool ~long:"kotlin-capture" ~default:true ~in_help:InferCommand.[(Capture, manual_java)] - "Enable Kotlin capture (experimental, do not use)." + "Enable Kotlin capture." and lineage_source = @@ -2467,8 +2467,7 @@ and pulse_force_continue = option, we force the analysis to continue, treating the callee as an unknown function. (Note \ that if the callee had latent issues, those keep being surfaced, as appropriate.) Activating \ this option will increase the coverage of code that is analyzed, but may introduce false \ - positives. It is intended to be used for debugging, to quickly assess if a false negative may \ - be caused by lack of coverage." + positives." and pulse_havoc_arguments = diff --git a/infer/src/base/IssueType.ml b/infer/src/base/IssueType.ml index 8613065abbe..1f541ecb5d9 100644 --- a/infer/src/base/IssueType.ml +++ b/infer/src/base/IssueType.ml @@ -500,7 +500,7 @@ let condition_always_true = let config_impact_analysis = - register ~enabled:false ~category:PerfRegression ~id:"CONFIG_IMPACT" Advice ConfigImpactAnalysis + register ~enabled:true ~category:PerfRegression ~id:"CONFIG_IMPACT" Advice ConfigImpactAnalysis ~user_documentation:[%blob "./documentation/issues/CONFIG_IMPACT.md"] @@ -1044,7 +1044,7 @@ let unnecessary_copy_assignment_pulse = let unnecessary_copy_assignment_const_pulse = - register ~enabled:false ~category:PerfRegression ~id:"PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST" + register ~enabled:true ~category:PerfRegression ~id:"PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST" Error Pulse ~hum:"Unnecessary Copy Assignment from Const" ~user_documentation:"See [PULSE_UNNECESSARY_COPY](#pulse_unnecessary_copy)." @@ -1174,7 +1174,7 @@ let vector_invalidation = let pulse_reference_stability = - register ~category:MemoryError ~id:"PULSE_REFERENCE_STABILITY" ~enabled:false Error Pulse + register ~category:MemoryError ~id:"PULSE_REFERENCE_STABILITY" ~enabled:true Error Pulse ~user_documentation:[%blob "./documentation/issues/PULSE_REFERENCE_STABILITY.md"] diff --git a/website/static/man/next/infer-capture.1.html b/website/static/man/next/infer-capture.1.html index 1aae870338e..d9efda74ef8 100644 --- a/website/static/man/next/infer-capture.1.html +++ b/website/static/man/next/infer-capture.1.html @@ -715,11 +715,10 @@

JAVA OPTIONS

The version of Java being used. Set it to your Java version if mvn is failing.

-

--kotlin-capture

+

--no-kotlin-capture

-

Activates: Enable Kotlin -capture (experimental, do not use). (Conversely: ---no-kotlin-capture)

+

Deactivates: Enable Kotlin +capture. (Conversely: --kotlin-capture)

--no-mask-sawja-exceptions

diff --git a/website/static/man/next/infer-report.1.html b/website/static/man/next/infer-report.1.html index 103483ce387..d16508f9cda 100644 --- a/website/static/man/next/infer-report.1.html +++ b/website/static/man/next/infer-report.1.html @@ -242,7 +242,7 @@

OPTIONS CLASS_CAST_EXCEPTION (disabled by default),
CONDITION_ALWAYS_FALSE (disabled by default),
CONDITION_ALWAYS_TRUE (disabled by default),
-CONFIG_IMPACT (disabled by default),
+CONFIG_IMPACT (enabled by default),
CONFIG_IMPACT_STRICT (disabled by default),
CONFIG_USAGE (disabled by default),
CONSTANT_ADDRESS_DEREFERENCE (disabled by default),
@@ -351,7 +351,7 @@

OPTIONS PULSE_DICT_MISSING_KEY (disabled by default),
PULSE_DYNAMIC_TYPE_MISMATCH (disabled by default),
PULSE_READONLY_SHARED_PTR_PARAM (enabled by default),
-PULSE_REFERENCE_STABILITY (disabled by default),
+PULSE_REFERENCE_STABILITY (enabled by default),
PULSE_RESOURCE_LEAK (enabled by default),
PULSE_TRANSITIVE_ACCESS (enabled by default),
PULSE_UNAWAITED_AWAITABLE (enabled by default),
@@ -359,7 +359,7 @@

OPTIONS PULSE_UNINITIALIZED_VALUE (enabled by default),
PULSE_UNNECESSARY_COPY (enabled by default),
PULSE_UNNECESSARY_COPY_ASSIGNMENT (enabled by default),
-PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (disabled by +PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (enabled by default),
PULSE_UNNECESSARY_COPY_ASSIGNMENT_MOVABLE (enabled by default),
diff --git a/website/static/man/next/infer.1.html b/website/static/man/next/infer.1.html index 199cd5adcee..5d6ae5a9548 100644 --- a/website/static/man/next/infer.1.html +++ b/website/static/man/next/infer.1.html @@ -947,7 +947,7 @@

OPTIONS CLASS_CAST_EXCEPTION (disabled by default),
CONDITION_ALWAYS_FALSE (disabled by default),
CONDITION_ALWAYS_TRUE (disabled by default),
-CONFIG_IMPACT (disabled by default),
+CONFIG_IMPACT (enabled by default),
CONFIG_IMPACT_STRICT (disabled by default),
CONFIG_USAGE (disabled by default),
CONSTANT_ADDRESS_DEREFERENCE (disabled by default),
@@ -1056,7 +1056,7 @@

OPTIONS PULSE_DICT_MISSING_KEY (disabled by default),
PULSE_DYNAMIC_TYPE_MISMATCH (disabled by default),
PULSE_READONLY_SHARED_PTR_PARAM (enabled by default),
-PULSE_REFERENCE_STABILITY (disabled by default),
+PULSE_REFERENCE_STABILITY (enabled by default),
PULSE_RESOURCE_LEAK (enabled by default),
PULSE_TRANSITIVE_ACCESS (enabled by default),
PULSE_UNAWAITED_AWAITABLE (enabled by default),
@@ -1064,7 +1064,7 @@

OPTIONS PULSE_UNINITIALIZED_VALUE (enabled by default),
PULSE_UNNECESSARY_COPY (enabled by default),
PULSE_UNNECESSARY_COPY_ASSIGNMENT (enabled by default),
-PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (disabled by +PULSE_UNNECESSARY_COPY_ASSIGNMENT_CONST (enabled by default),
PULSE_UNNECESSARY_COPY_ASSIGNMENT_MOVABLE (enabled by default),
@@ -1545,11 +1545,10 @@

OPTIONS

See also infer-analyze(1) and infer-capture(1).
---kotlin-capture

+--no-kotlin-capture

-

Activates: Enable Kotlin -capture (experimental, do not use). (Conversely: ---no-kotlin-capture)

+

Deactivates: Enable Kotlin +capture. (Conversely: --kotlin-capture)

See also infer-capture(1).