Boolean literal arguments: do not report in batch (offline) mode with INFORMATION severity

#KT-29494 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-01-25 19:46:25 +09:00
committed by Mikhail Glukhikh
parent 6f95030fe4
commit fe006cf342
@@ -48,9 +48,10 @@ class BooleanLiteralArgumentInspection(
fixes += AddNamesToLastBooleanArgumentsFix() fixes += AddNamesToLastBooleanArgumentsFix()
} }
fixes += IntentionWrapper(AddNameToArgumentIntention(), argument.containingKtFile) fixes += IntentionWrapper(AddNameToArgumentIntention(), argument.containingKtFile)
holder.registerProblem( holder.registerProblemWithoutOfflineInformation(
argument, argument,
"Boolean literal argument without parameter name", "Boolean literal argument without parameter name",
isOnTheFly,
if (reportSingle || hasPreviousUnnamedBoolean) GENERIC_ERROR_OR_WARNING else INFORMATION, if (reportSingle || hasPreviousUnnamedBoolean) GENERIC_ERROR_OR_WARNING else INFORMATION,
*fixes.toTypedArray() *fixes.toTypedArray()
) )