Is there a way to disable this inspection? I know, this maybe be a bad design, but I still would like to disable it.
Asked
Active
Viewed 3,743 times
21
-
6Why vote negatively for the question? Please explain. – yu.pitomets Jan 03 '19 at 17:30
-
1What inspection do you mean? Please explain. – Valerii Jan 03 '19 at 17:37
-
This inspection checks all calls to a function, and if it finds that in all calls the value of this parameter is the same, it issues a warning. This is a nuisance in case I have not written enough code, and I do not want such warnings to clog my Problems list. – Baruch Youssin Jul 13 '21 at 11:18
3 Answers
21
Find an instance of the inspection, and hit ALT+ENTER to open the content menu. You'll see a suggestion there that looks like "Inline value 'XYZ' for parameter 'myParameter'". Click the right arrow next to it to open a second context menu, and there you'll find options to edit the inspection setting in order to tune the conditions that will produce it, suppress it for the method/class/parameter, or even disable it altogether.

Mureinik
- 297,002
- 52
- 306
- 350
15
@SuppressWarnings("SameParameterValue")
I tested it in Android Studio 3.5, which is based on IntelliJ-Idea, so it probably works in other IntelliJ-Idea based IDEs too.

pintergabor
- 428
- 5
- 8
5
Use @SuppressWarnings("SameParameterValue")
in java
and @Suppress("SameParameterValue")
in kotlin
Tested on Android Studio Arctic Fox | 2020.3.1

Syed Rafaqat Hussain
- 1,009
- 1
- 9
- 33