ValidationMessageConsumer warning() {
      return new ValidationMessageConsumer() {
        @Override
        public void onMessage(@NotNull PsiElement context, @NotNull String message) {
          warnings.add(Pair.create(context, message));
        }
      };
    }
ValidationMessageConsumer warning()