Examples of JsHintProcessor


Examples of ro.isdc.wro.extensions.processor.js.JsHintProcessor

  /**
   * {@inheritDoc}
   */
  @Override
  protected ResourcePreProcessor createResourceProcessor() {
    final ResourcePreProcessor processor = new JsHintProcessor() {
      @Override
      public void process(final Resource resource, final Reader reader, final Writer writer)
          throws IOException {
        getProgressIndicator().onProcessingResource(resource);
        // use StringWriter to discard the merged processed result (linting is useful only for reporting errors).
View Full Code Here

Examples of ro.isdc.wro.extensions.processor.js.JsHintProcessor

      }
    }));
    map.put(JsHintProcessor.ALIAS, new LazyProcessorDecorator(new LazyInitializer<ResourcePreProcessor>() {
      @Override
      protected ResourcePreProcessor initialize() {
        return new JsHintProcessor();
      }
    }));
    map.put(JsLintProcessor.ALIAS, new LazyProcessorDecorator(new LazyInitializer<ResourcePreProcessor>() {
      @Override
      protected ResourcePreProcessor initialize() {
View Full Code Here

Examples of ro.isdc.wro.extensions.processor.js.JsHintProcessor

    extends AbstractTestLinterProcessor {
  private JsHintProcessor victim;

  @Before
  public void setUp() {
    victim = new JsHintProcessor();
  }
View Full Code Here

Examples of ro.isdc.wro.extensions.processor.js.JsHintProcessor

    victim = new JsHintProcessor();
  }

  @Override
  protected ResourcePreProcessor newLinterProcessor() {
    return new JsHintProcessor();
  }
View Full Code Here

Examples of ro.isdc.wro.extensions.processor.js.JsHintProcessor

  @Test
  public void testWithOptionsSet()
      throws Exception {
    final ThreadLocal<Throwable> cause = new ThreadLocal<Throwable>();

    final ResourcePostProcessor processor = new JsHintProcessor() {
      @Override
      protected void onLinterException(final LinterException e, final Resource resource) {
        cause.set(e);
      };
    }.setOptionsAsString("maxerr=1");
View Full Code Here

Examples of ro.isdc.wro.extensions.processor.js.JsHintProcessor

   * trying to reuse the scope. TODO: This needs to be investigated.
   */
  @Test
  public void canBeExecutedMultipleTimes()
      throws Exception {
    final JsHintProcessor processor = new JsHintProcessor();
    final Callable<Void> task = new Callable<Void>() {
      @Override
      public Void call() {
        try {
          processor.process(new StringReader("alert(1);"), new StringWriter());
        } catch (final Exception e) {
          throw new RuntimeException(e);
        }
        return null;
      }
View Full Code Here

Examples of ro.isdc.wro.extensions.processor.js.JsHintProcessor

    WroTestUtils.runConcurrently(task);
  }

  @Test
  public void shouldSupportCorrectResourceTypes() {
    WroTestUtils.assertProcessorSupportResourceTypes(new JsHintProcessor(), ResourceType.JS);
  }
View Full Code Here

Examples of ro.isdc.wro.extensions.processor.js.JsHintProcessor

  }

  @Test(expected = LinterException.class)
  public void shouldOverrideDefaultOptions()
      throws Exception {
    victim = new JsHintProcessor() {
      @Override
      protected String createDefaultOptions() {
        return "bitwise";
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.