Package com.googlecode.jslint4java

Examples of com.googlecode.jslint4java.JSLint


    }

    @Override
    public void execute() throws MojoExecutionException, MojoFailureException
    {
        JSLint jsLint = applyJSlintSource();
        applyDefaults();
        applyOptions(jsLint);
        List<File> files = getFilesToProcess();
        int failures = 0;
        ReportWriter reporter = new ReportWriter(new File(outputFolder, JSLINT_XML), new JSLintXmlFormatter());
View Full Code Here


            try {
                Context cx = contextFactory.enter();
                ScriptableObject scope = cx.initStandardObjects();
                Reader r = new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(JSLINT_FILE), UTF8);
                cx.evaluateReader(scope, r, "jslint.js", 1, null);
                return new JSLint(contextFactory, scope);
            } catch (IOException ioe) {
                throw new MojoExecutionException("Cant' load jslint.js", ioe);
            } finally {
                Context.exit();
            }
View Full Code Here

        if (resources.size() == 0) {
            // issue 53: this isn't a fail, just a notice.
            log(NO_FILES_TO_LINT);
        }

        JSLint lint = makeLint();
        applyOptions(lint);

        for (ResultFormatter rf : formatters) {
            rf.begin();
        }
View Full Code Here

    public void execute() throws MojoExecutionException, MojoFailureException {
        if (skip) {
            getLog().info("skipping JSLint");
            return;
        }
        JSLint jsLint = applyJSlintSource();
        applyDefaults();
        applyOptions(jsLint);
        List<File> files = getFilesToProcess();
        int failures = 0;
        ReportWriter reporter = makeReportWriter();
View Full Code Here

            return;
        }

        BufferedReader reader = null;
        try {
            JSLint lint = lintProvider.getJsLint();
            // TODO: this should react to changes in the prefs pane instead.
            reader = new BufferedReader(new InputStreamReader(file
                    .getContents(), file.getCharset()));
            JSLintResult result = lint.lint(file.getFullPath().toString(),
                    reader);
            for (Issue issue : result.getIssues()) {
                addMarker(file, issue);
            }
        } catch (IOException e) {
View Full Code Here

        return jsLint;
    }

    /** Set up the current instance of JSLint using the current preferences. */
    public void configure() {
        JSLint lint = getJsLint();
        lint.resetOptions();
        IPreferencesService prefs = Platform.getPreferencesService();
        for (Option o : Option.values()) {
            String value = prefs.getString(JSLintPlugin.PLUGIN_ID, o.getLowerName(), null, null);
            if (value != null) {
                lint.addOption(o, value);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.googlecode.jslint4java.JSLint

Copyright © 2018 www.massapicom. 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.