ResolvedNode resolved2 = context.resolve(logTag); if ((resolved1 == null || resolved2 == null || !resolved1.equals(resolved2)) && context.isEnabled(WRONG_TAG)) { Location location = context.getLocation(logTag); Location alternate = context.getLocation(isLoggableTag); if (logCallName.charAt(0) == levelChar || !context.isEnabled(WRONG_TAG)) { return;
&& !withinConditional && performsWork(context, node) && context.isEnabled(CONDITIONAL)) { String message = String.format("The log call Log.%1$s(...) should be " + "conditional: surround with `if (Log.isLoggable(...))` or " + if (context.isEnabled(LONG_TAG)) { int tagArgumentIndex = PRINTLN.equals(name) ? 1 : 0; PsiParameterList parameterList = method.getParameterList();
&& !withinConditional && performsWork(context, node) && context.isEnabled(CONDITIONAL)) { String message = String.format("The log call Log.%1$s(...) should be " + "conditional: surround with `if (Log.isLoggable(...))` or " + if (context.isEnabled(LONG_TAG)) { int tagArgumentIndex = PRINTLN.equals(name) ? 1 : 0; if (method.getArgumentCount() > tagArgumentIndex
PsiElement resolved2 = context.getEvaluator().resolve(logTag); if ((resolved1 == null || resolved2 == null || !resolved1.equals(resolved2)) && context.isEnabled(WRONG_TAG)) { Location location = context.getLocation(logTag); Location alternate = context.getLocation(isLoggableTag); if (logCallName.charAt(0) == levelChar || !context.isEnabled(WRONG_TAG)) { return;
@Override public void checkClass(@NonNull JavaContext context, @NonNull PsiClass declaration) { // Only check classes that are not declared abstract. if (!context.getEvaluator().isAbstract(declaration)) { MediaSessionCallbackVisitor visitor = new MediaSessionCallbackVisitor(context); declaration.accept(visitor); if (!visitor.isPlayFromSearchMethodFound() && context.isEnabled(MISSING_ON_PLAY_FROM_SEARCH)) { context.report(MISSING_ON_PLAY_FROM_SEARCH, declaration, context.getNameLocation(declaration), "This class does not override `" + METHOD_MEDIA_SESSION_PLAY_FROM_SEARCH + "` from `MediaSession.Callback`" + " The method should be overridden and implemented to support " + "Voice search on Android Auto."); } } }