Skip to content

Commit

Permalink
[eradicate/nullsafe] remove checkers
Browse files Browse the repository at this point in the history
Summary: Eradicate/Nullsafe has been deprecated and can be removed.

Reviewed By: geralt-encore

Differential Revision:
D52017524

Privacy Context Container: L1122176

fbshipit-source-id: 26c0d05b56e23fd80a4c0d791c87c5ec4bd8ea37
  • Loading branch information
ngorogiannis authored and facebook-github-bot committed Dec 12, 2023
1 parent cfedb47 commit e5ae7a9
Show file tree
Hide file tree
Showing 196 changed files with 100 additions and 16,450 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ rebar3.crashdump
/infer/src/clang/dune
/infer/src/integration/dune
/infer/src/java/dune
/infer/src/nullsafe/unit/dune
/infer/src/opensource/dune
/infer/src/python/unit/dune
/infer/src/unit/dune
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ DIRECT_TESTS += \
java_immutability \
java_inefficientKeysetIterator \
java_litho-required-props \
java_nullsafe \
java_nullsafe-annotation-graph \
java_performance \
java_performance-exclusive \
java_pulse \
Expand Down
1 change: 0 additions & 1 deletion examples/demo/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ infer -- make -C 02 clean all
infer explore --no-source-preview --select 0
infer -- make -C 03 clean all
infer explore --no-source-preview --select 1
infer --eradicate-only -- make -C 04 clean all
2 changes: 1 addition & 1 deletion infer/annotations/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Infer annotations

This project provides extra annotations for Java checkers, such as starvation or nullsafe.
This project provides extra annotations for Java checkers, such as starvation.

## How to build JARs (suitable for release)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ public static <T> T assumeNotNull(@Nullable T object) {
}

/**
* Makes Nullsafe stop complaining when {@code object} is dereferenced or converted to a
* non-nullable. In contrast with {@code #assumeNotNull()}, indicates cases when the proper fix
* needs to be committed, but for some reason it is hard or impossible to do it staight away.
* Makes Nullsafe (a nullability type checker) stop complaining when {@code object} is
* dereferenced or converted to a non-nullable. In contrast with {@code #assumeNotNull()},
* indicates cases when the proper fix needs to be committed, but for some reason it is hard or
* impossible to do it staight away.
*/
public static <T> T nullsafeFIXME(@Nullable T object, String explanationOrTask) {
return object;
Expand Down
75 changes: 0 additions & 75 deletions infer/documentation/checkers/Eradicate.md

This file was deleted.

4 changes: 2 additions & 2 deletions infer/documentation/checkers/Pulse.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void false_negative() {
int* x = (int*) malloc(sizeof(int));
if (x) {
// unknown call to x makes Pulse forget that x was allocated, in case it frees x
unknown(x);
unknown(x);
}
} // no memory leak reported: false negative!
Expand All @@ -94,7 +94,7 @@ $ infer debug --procedures --procedures-filter 'false_negative' --procedures-sum

## Pulse x Nullsafe

[Nullsafe](/docs/next/checker-eradicate) is a type checker for `@Nullable` annotations for Java. Classes following the Nullsafe discipline are annotated with `@Nullsafe`.
Nullsafe is a type checker for `@Nullable` annotations for Java. Classes following the Nullsafe discipline are annotated with `@Nullsafe`.

Consider the classes `Person` and `Registry` from the previous example. Assuming that class `Person` is annotated with `@Nullsafe`. In this case, we also annotate `getEmergencyContact()` with `@Nullable`, to make explicit that this method can return the `null` value. There is still the risk that classes depending on `Person` have Null dereferences. In this case, Pulse would report a Null dereference on `Registry`. It could also be the case that class `Registry` is annotated with `@Nullsafe`. By default Pulse reports on `@Nullsafe` files too, see the `--pulse-nullsafe-report-npe` option (Facebook-specific: Pulse does not report on `@Nullsafe` files).

Expand Down
15 changes: 0 additions & 15 deletions infer/documentation/issues/CHECKERS_IMMUTABLE_CAST.md

This file was deleted.

22 changes: 0 additions & 22 deletions infer/documentation/issues/ERADICATE_CONDITION_REDUNDANT.md

This file was deleted.

17 changes: 0 additions & 17 deletions infer/documentation/issues/ERADICATE_FIELD_NOT_INITIALIZED.md

This file was deleted.

20 changes: 0 additions & 20 deletions infer/documentation/issues/ERADICATE_FIELD_NOT_NULLABLE.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions infer/documentation/issues/ERADICATE_PARAMETER_NOT_NULLABLE.md

This file was deleted.

18 changes: 0 additions & 18 deletions infer/documentation/issues/ERADICATE_RETURN_NOT_NULLABLE.md

This file was deleted.

20 changes: 0 additions & 20 deletions infer/documentation/issues/ERADICATE_RETURN_OVER_ANNOTATED.md

This file was deleted.

18 changes: 0 additions & 18 deletions infer/man/man1/infer-analyze.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,6 @@ OPTIONS
--liveness, --parameter-not-null-checked, --racerd, --siof,
--self-in-block, --starvation (Conversely: --default-checkers)

--eradicate
Activates: checker eradicate: The eradicate `@Nullable` checker
for Java annotations. (Conversely: --no-eradicate)

--eradicate-only
Activates: Enable eradicate and disable all other checkers
(Conversely: --no-eradicate-only)

--files-to-analyze-index file
File containing a list of source files where analysis should start
from. When used, the set of files given to this argument must be a
Expand Down Expand Up @@ -153,16 +145,6 @@ OPTIONS
Show this manual with all internal options in the INTERNAL OPTIONS
section

--immutable-cast
Activates: checker immutable-cast: Detection of object cast from
immutable types to mutable types. For instance, it will detect
casts from `ImmutableList` to `List`, `ImmutableMap` to `Map`, and
`ImmutableSet` to `Set`. (Conversely: --no-immutable-cast)

--immutable-cast-only
Activates: Enable immutable-cast and disable all other checkers
(Conversely: --no-immutable-cast-only)

--impurity
Activates: checker impurity: Detects functions with potential
side-effects. Same as "purity", but implemented on top of Pulse.
Expand Down
Loading

0 comments on commit e5ae7a9

Please sign in to comment.