Skip to content

Commit

Permalink
[config] update a few defaults
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jvillard authored and facebook-github-bot committed Jun 12, 2024
1 parent 86b5083 commit 6d1d04d
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 42 deletions.
5 changes: 2 additions & 3 deletions infer/man/man1/infer-capture.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 6 additions & 9 deletions infer/man/man1/infer-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -705,15 +705,15 @@ 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),
PULSE_UNINITIALIZED_CONST (disabled by default),
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions infer/man/man1/infer-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -234,15 +234,15 @@ 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),
PULSE_UNINITIALIZED_CONST (disabled by default),
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
Expand Down
11 changes: 5 additions & 6 deletions infer/man/man1/infer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -705,15 +705,15 @@ 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),
PULSE_UNINITIALIZED_CONST (disabled by default),
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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions infer/src/base/Config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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 =
Expand Down
6 changes: 3 additions & 3 deletions infer/src/base/IssueType.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]


Expand Down Expand Up @@ -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)."

Expand Down Expand Up @@ -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"]


Expand Down
7 changes: 3 additions & 4 deletions website/static/man/next/infer-capture.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions website/static/man/next/infer-report.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions website/static/man/next/infer.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d1d04d

Please sign in to comment.