Skip to content

Commit

Permalink
Infer# integration (#1361)
Browse files Browse the repository at this point in the history
Summary:
Dear Infer team,

To contribute to Infer community, I would like to integrate infer#'s language agnostic layer into Infer.

Please help to review, discuss and consider to merge this feature.

Thanks,
Xiaoyu

Pull Request resolved: #1361

Reviewed By: skcho

Differential Revision: D25928458

Pulled By: jvillard

fbshipit-source-id: 7726150b8
  • Loading branch information
xi-liu-ds authored and facebook-github-bot committed Feb 4, 2021
1 parent e0f0022 commit 285ddb4
Show file tree
Hide file tree
Showing 119 changed files with 2,293 additions and 110 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ duplicates.txt
/infer/tests/build_systems/incremental_analysis_add_procedure/src
/infer/tests/build_systems/java_test_determinator/*.test
/infer/tests/build_systems/java_source_parser/*.test
/infer/tests/codetoanalyze/dotnet/*/*.json
/_release
/infer-source

Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,23 @@ BUILD_SYSTEMS_TESTS += mvn
endif
endif

DIRECT_TESTS += \
dotnet_arithmetic \
dotnet_array \
dotnet_bgeble \
dotnet_box \
dotnet_fieldderef \
dotnet_isinst \
dotnet_ldstr \
dotnet_logical \
dotnet_nullderef-interproc \
dotnet_nullderef-simple \
dotnet_nullparam \
dotnet_numcomparison \
dotnet_reference \
dotnet_resourceleak \
dotnet_starg

ifeq ($(BUILD_C_ANALYZERS)+$(BUILD_JAVA_ANALYZERS),yes+yes)
BUILD_SYSTEMS_TESTS += make utf8_in_pwd waf
endif
Expand Down
5 changes: 3 additions & 2 deletions infer/man/man1/infer-analyze.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ OPTIONS
--no-default-checkers
Deactivates: Default checkers: --biabduction,
--fragment-retains-view, --inefficient-keyset-iterator, --linters,
--liveness, --racerd, --siof, --self-in-block, --starvation,
--uninit (Conversely: --default-checkers)
--liveness, --racerd, --dotnet-resource-leak, --siof,
--self-in-block, --starvation, --uninit (Conversely:
--default-checkers)

--eradicate
Activates: checker eradicate: The eradicate `@Nullable` checker
Expand Down
68 changes: 47 additions & 21 deletions infer/man/man1/infer-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ OPTIONS
`<reason_string>` is a non-empty string used to explain why the
issue was filtered. See also infer-report(1) and infer-run(1).

--cfg-json file
Path to CFG json file See also infer-analyzejson(1).

--changed-files-index file
Specify the file containing the list of source files from which
reactive analysis should start. Source files should be specified
Expand Down Expand Up @@ -313,32 +316,37 @@ OPTIONS
--developer-mode, --print-buckets, --print-types,
--reports-include-ml-loc, --no-only-cheap-debug, --trace-error,
--write-dotty, --write-html) (Conversely: --no-debug | -G)
See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--debug-level level
Debug level (sets --bo-debug level, --debug-level-analysis level,
--debug-level-capture level, --debug-level-linters level):
- 0: only basic debugging enabled
- 1: verbose debugging enabled
- 2: very verbose debugging enabled
See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
values. See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
values. See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
values. See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--no-deduplicate
Deactivates: Apply issue-specific deduplication during analysis
Expand All @@ -348,8 +356,9 @@ OPTIONS
--no-default-checkers
Deactivates: Default checkers: --biabduction,
--fragment-retains-view, --inefficient-keyset-iterator, --linters,
--liveness, --racerd, --siof, --self-in-block, --starvation,
--uninit (Conversely: --default-checkers) See also infer-analyze(1).
--liveness, --racerd, --dotnet-resource-leak, --siof,
--self-in-block, --starvation, --uninit (Conversely:
--default-checkers) See also infer-analyze(1).

--no-default-linters
Deactivates: Use the default linters for the analysis.
Expand Down Expand Up @@ -420,6 +429,7 @@ OPTIONS
DIRECT_ATOMIC_PROPERTY_ACCESS (enabled by default),
DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER (enabled by default),
DIVIDE_BY_ZERO (disabled by default),
DOTNET_RESOURCE_LEAK (enabled by default),
DO_NOT_REPORT (enabled by default),
EMPTY_VECTOR_ACCESS (enabled by default),
ERADICATE_ANNOTATION_GRAPH (enabled by default),
Expand Down Expand Up @@ -624,8 +634,9 @@ OPTIONS
See also infer-capture(1).

--help
Show this manual See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-debug(1), infer-explore(1), infer-help(1), infer-report(1),
Show this manual See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-debug(1),
infer-explore(1), infer-help(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--help-checker +checker-id
Expand All @@ -635,14 +646,16 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-debug(1), infer-explore(1), infer-help(1), infer-report(1),
to pager otherwise. See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-debug(1),
infer-explore(1), infer-help(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--help-full
Show this manual with all internal options in the INTERNAL OPTIONS
section See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-debug(1), infer-explore(1), infer-help(1), infer-report(1),
section See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-debug(1),
infer-explore(1), infer-help(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--help-issue-type +UNIQUE_ID
Expand Down Expand Up @@ -1179,6 +1192,9 @@ OPTIONS
Activates: Enable starvation and disable all other checkers
(Conversely: --no-starvation-only) See also infer-analyze(1).

--tenv-json file
Path to TEnv json file See also infer-analyzejson(1).

--threadsafe-aliases json
Specify custom annotations that should be considered aliases of
@ThreadSafe See also infer-analyze(1).
Expand Down Expand Up @@ -1338,6 +1354,9 @@ INTERNAL OPTIONS
--censor-report-reset
Set --censor-report to the empty list.

--cfg-json-reset
Cancel the effect of --cfg-json.

--changed-files-index-reset
Cancel the effect of --changed-files-index.

Expand Down Expand Up @@ -1461,6 +1480,10 @@ INTERNAL OPTIONS
--disable-issue-type-reset
Set --disable-issue-type to the empty list.

--no-dotnet-resource-leak
Deactivates: checker dotnet-resource-leak: "resource leak" checker
for .NET. (Conversely: --dotnet-resource-leak)

--no-dotty-cfg-libs
Deactivates: Print the cfg of the code coming from the libraries
(Conversely: --dotty-cfg-libs)
Expand Down Expand Up @@ -1957,6 +1980,9 @@ INTERNAL OPTIONS
--symops-per-iteration-reset
Cancel the effect of --symops-per-iteration.

--tenv-json-reset
Cancel the effect of --tenv-json.

--test-determinator
Activates: Run infer in Test Determinator mode. It is used
together with the --modified-lines and --profiler-samples flags,
Expand Down Expand Up @@ -2120,9 +2146,9 @@ FILES


SEE ALSO
infer-analyze(1), infer-capture(1), infer-compile(1), infer-debug(1),
infer-explore(1), infer-help(1), infer-report(1), infer-reportdiff(1),
infer-run(1)
infer-analyze(1), infer-analyzejson(1), infer-capture(1),
infer-compile(1), infer-debug(1), infer-explore(1), infer-help(1),
infer-report(1), infer-reportdiff(1), infer-run(1)



1 change: 1 addition & 0 deletions infer/man/man1/infer-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ OPTIONS
DIRECT_ATOMIC_PROPERTY_ACCESS (enabled by default),
DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER (enabled by default),
DIVIDE_BY_ZERO (disabled by default),
DOTNET_RESOURCE_LEAK (enabled by default),
DO_NOT_REPORT (enabled by default),
EMPTY_VECTOR_ACCESS (enabled by default),
ERADICATE_ANNOTATION_GRAPH (enabled by default),
Expand Down
58 changes: 37 additions & 21 deletions infer/man/man1/infer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ OPTIONS
`<reason_string>` is a non-empty string used to explain why the
issue was filtered. See also infer-report(1) and infer-run(1).

--cfg-json file
Path to CFG json file See also infer-analyzejson(1).

--changed-files-index file
Specify the file containing the list of source files from which
reactive analysis should start. Source files should be specified
Expand Down Expand Up @@ -313,32 +316,37 @@ OPTIONS
--developer-mode, --print-buckets, --print-types,
--reports-include-ml-loc, --no-only-cheap-debug, --trace-error,
--write-dotty, --write-html) (Conversely: --no-debug | -G)
See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--debug-level level
Debug level (sets --bo-debug level, --debug-level-analysis level,
--debug-level-capture level, --debug-level-linters level):
- 0: only basic debugging enabled
- 1: verbose debugging enabled
- 2: very verbose debugging enabled
See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--debug-level-analysis int
Debug level for the analysis. See --debug-level for accepted
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
values. See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--debug-level-capture int
Debug level for the capture. See --debug-level for accepted
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
values. See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--debug-level-linters int
Debug level for the linters. See --debug-level for accepted
values. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-report(1), infer-reportdiff(1), and infer-run(1).
values. See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--no-deduplicate
Deactivates: Apply issue-specific deduplication during analysis
Expand All @@ -348,8 +356,9 @@ OPTIONS
--no-default-checkers
Deactivates: Default checkers: --biabduction,
--fragment-retains-view, --inefficient-keyset-iterator, --linters,
--liveness, --racerd, --siof, --self-in-block, --starvation,
--uninit (Conversely: --default-checkers) See also infer-analyze(1).
--liveness, --racerd, --dotnet-resource-leak, --siof,
--self-in-block, --starvation, --uninit (Conversely:
--default-checkers) See also infer-analyze(1).

--no-default-linters
Deactivates: Use the default linters for the analysis.
Expand Down Expand Up @@ -420,6 +429,7 @@ OPTIONS
DIRECT_ATOMIC_PROPERTY_ACCESS (enabled by default),
DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER (enabled by default),
DIVIDE_BY_ZERO (disabled by default),
DOTNET_RESOURCE_LEAK (enabled by default),
DO_NOT_REPORT (enabled by default),
EMPTY_VECTOR_ACCESS (enabled by default),
ERADICATE_ANNOTATION_GRAPH (enabled by default),
Expand Down Expand Up @@ -624,8 +634,9 @@ OPTIONS
See also infer-capture(1).

--help
Show this manual See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-debug(1), infer-explore(1), infer-help(1), infer-report(1),
Show this manual See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-debug(1),
infer-explore(1), infer-help(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--help-checker +checker-id
Expand All @@ -635,14 +646,16 @@ OPTIONS
--help-format { auto | groff | pager | plain }
Show this help in the specified format. auto sets the format to
plain if the environment variable TERM is "dumb" or undefined, and
to pager otherwise. See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-debug(1), infer-explore(1), infer-help(1), infer-report(1),
to pager otherwise. See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-debug(1),
infer-explore(1), infer-help(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--help-full
Show this manual with all internal options in the INTERNAL OPTIONS
section See also infer-analyze(1), infer-capture(1), infer-compile(1),
infer-debug(1), infer-explore(1), infer-help(1), infer-report(1),
section See also infer-analyze(1), infer-analyzejson(1),
infer-capture(1), infer-compile(1), infer-debug(1),
infer-explore(1), infer-help(1), infer-report(1),
infer-reportdiff(1), and infer-run(1).

--help-issue-type +UNIQUE_ID
Expand Down Expand Up @@ -1179,6 +1192,9 @@ OPTIONS
Activates: Enable starvation and disable all other checkers
(Conversely: --no-starvation-only) See also infer-analyze(1).

--tenv-json file
Path to TEnv json file See also infer-analyzejson(1).

--threadsafe-aliases json
Specify custom annotations that should be considered aliases of
@ThreadSafe See also infer-analyze(1).
Expand Down Expand Up @@ -1307,9 +1323,9 @@ FILES


SEE ALSO
infer-analyze(1), infer-capture(1), infer-compile(1), infer-debug(1),
infer-explore(1), infer-help(1), infer-report(1), infer-reportdiff(1),
infer-run(1)
infer-analyze(1), infer-analyzejson(1), infer-capture(1),
infer-compile(1), infer-debug(1), infer-explore(1), infer-help(1),
infer-report(1), infer-reportdiff(1), infer-run(1)



0 comments on commit 285ddb4

Please sign in to comment.