How to create a global filter/ignore for specific null dereference warnings?
- 主要语言
- OCaml
- 星标
- 15.7k
- 派生
- 2.1k
- 平均合并
- 19 小时 36 分钟
- 30 天内合并 PR
- 13
描述
When an Android project is changed to use `compileSdkVersion 28` and `targetSdkVersion 28` the Infer tool will generate lots of warnings in Fragments like this:
```
object returned by `getActivity()` could be null and is dereferenced at line xxx
object returned by `getArguments()` could be null and is dereferenced at line xxx
```
Is there a way to turn off these 2 specific warnings in all files? Is there a way to do it by adding annotations to the file, or by setting some sort of global setting outside the Java files?
I have checked the following issues, but I don't know if they apply to this situation:
https://github.com/facebook/infer/issues/150
https://github.com/facebook/infer/issues/935
----------
Please make sure your issue is not addressed in the [FAQ](http://fbinfer.com/support.html#troubleshooting).
Please include the following information:
- [x] The version of infer from `infer --version`. v0.16.0
- [x] Your operating system and version, for example "Debian 9", "MacOS High Sierra", whether you are using Docker, etc. Ubuntu Linux
- [x] Which command you ran, for example `infer -- make`. infer run -- ./gradlew assembleDebug
- [x] The full output in a paste, for instance a [gist](https://gist.github.com/).
- [ ] If possible, a minimal example to reproduce your problem (for instance, some code where
infer reports incorrectly, together with the way you run infer to reproduce the incorrect
report).
贡献指南
评估
这个 Issue 还没有评估数据。