Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTriple committed Feb 18, 2013
0 parents commit 9cfc7f4
Show file tree
Hide file tree
Showing 271 changed files with 127,482 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Makefile
@@ -0,0 +1,41 @@
.PHONY: parsers p update s lint

CP=export CLASSPATH=../bin/antlr-3.3-complete.jar:$$CLASSPATH
JANTLR=java org.antlr.Tool -dfa
PALL=Turtle.g ASTBuildingTurtle.g ASTWalker.g
MOVE_PARSERS=mv *.js ../lib/


# TODO: target for testsuite


# this target builds all parsers
parsers:
${CP} && cd grammars && ${JANTLR} ${PALL} && ${MOVE_PARSERS}
@echo All Parsers from ${PALL} successfully built.


# this target builds the parser from the specified grammar in macro G
p:
${CP} && cd grammars && ${JANTLR} ${G}.g && ${MOVE_PARSERS}
@echo Parser from ./grammars/${G}.g successfully built.


# this target updates the token definitions from generated
# ASTBuildingTurtle.tokens. See the referenced shellscript for more
# precise information.
update:
./bin/updateTT


# this target starts a small http proxy server
s:
@echo Starting http-proxy at localhost:4567...
ruby bin/proxy.rb &


# this target lets one perform static code analysis of the javascript file
# specified at the macro f
lint:
java -jar bin/jslint4java-2.0.2/jslint4java-2.0.2.jar ${f}

Binary file added bin/.DS_Store
Binary file not shown.
Binary file added bin/antlr-3.3-complete.jar
Binary file not shown.
23 changes: 23 additions & 0 deletions bin/jslint4java-2.0.2/LICENCE.txt
@@ -0,0 +1,23 @@
Copyright (C) 2007 by Dominic Mitchell

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
179 changes: 179 additions & 0 deletions bin/jslint4java-2.0.2/NEWS.markdown
@@ -0,0 +1,179 @@
Revision history for jslint4java
================================

2.0.2 (2012-01-05)
------------------

* Update to JSLint 2012-02-03.
- This removes the `adsafe`, `confusion` and `safe` options.
- This adds the `anon` option.

2.0.1 (2011-10-19)
------------------

* issue 62: Set default indent correctly.
* issue 64: Make the maven plugin work with older maven versions.
* issue 65: Don't blow up when the maven plugin writes a report.
* Update to JSLint 2011-10-17.

2.0.0 (2011-06-12)
------------------

* Add a maven plugin.
* Update to JSLint 2011-07-11.
- The nature of the boolean options has been inverted--beware!
- `bitwise` now enables the use of bitwise operators.
- `newcap` now means “ignore capitalisation of constructors”
- `plusplus` now means “incr” and “decr” operators are tolerated.
- `regexp` now means allow the use of “.” in regexes.
- `undef` now means you can declare variables out of order.
- `white` now means acceptance of non-compliant whitespace.
- New options:
- `sloppy`, which is the inverse of `strict`.
- `confusion`, allows inconsistent types.
- `vars`, to tolerate multiple `var` declarations per function (replaces `onevar`).
- `eqeq`, to tolerate "==" and "!=".
- `node`, to predefine node.js globals.
- `properties`, to require declaration of all properties.
- `unparam`, to allow unused parameters.
- Removed options:
- `onevar`
- `strict`
* The goodParts() api has been removed (it's the default now).
* issue 57: cope with a BOM in files.

1.4.7 (2011-03-08)
------------------

* Add OSGI bundle headers.
* issue 52: Add checkstyle xml formatter.
* issue 53: No files passed to the ant task is no longer an error (just an info message).
* Update to JSLint 2011-03-07.
* This adds the `continue` option, whilst removing `eqeqeq`, `immed` and `laxbreak` options.
* JSLints interpretation of line and column numbers has changed. I've tried to keep up. Please [file a bug](http://code.google.com/p/jslint4java/issues) if errors aren't reported at the expected place.

1.4.6 (2011-01-02)
------------------

* Update to JSLint 2010-12-23.
* This outlaws a top-level "use strict"—stick it in a function instead.

1.4.5 (2011-01-02)
------------------

* issue 47: Make thread safe.
* issue 46: Clean API for JSLintBuilder.fromDefault().
* issue 48: Kill JSLintBuilder.create()

1.4.4 (2010-11-08)
------------------

* issue 45: Add support for “maxlen” option. Thanks to pigulla for spotting.
* Update dependencies:
* rhino 1.7R2
* JCommander 1.11

1.4.3 (2010-10-28)
------------------

* issue 43: allow access to reports form the command line.
* Thanks to rharding and stigkj for their assistance.
* issue 44: stop IllegalAccessException warning from being emitted.
* Update to JSLint 2010-10-26.

1.4.2 (2010-09-13)
------------------

* issue 42: numeric keys throw exception.
* Update JSLint to 2010-09-09.
* Update to JCommander 1.7.
* **[INCOMPATIBILITY]** This version is able to work with Java 5, so that is now the minimum version again.

1.4.1 (2010-08-05)
------------------

* issue 40: StringIndexOutOfBoundsException on XmlResultFormatter.

1.4 (2010-07-27)
----------------

* issue 35: Removed embedded JUnit.
* issue 30: Add a "report" formatter to the ant task.
* Also available on the command line with `--report`
* issue 37: add a `--encoding` flag for specifying the encoding files on the command line.
* issue 36: add a JUnit XML formatter.
* issue 26: add support for `.data()` call in JSLINT.
* This is only available in the Java API right now.
* issue 39: add failureproperty to the ant task.
* Use JCommander for flag processing.
* **[INCOMPATIBILITY]** This means that command line option parsing has changed slightly. You now have to say `--indent 2` instead of `--indent=2`.
* **[INCOMPATIBILITY]** The minimum version of Java is now 6.
* Update to JSLint 2010-07-14.
* Adds options: es5, windows.
* Removes options: sidebar.

1.3.3 (2009-12-02)
------------------

* issue 8: add support for predef option.
* Update to JSLint 2009-11-22
* Adds "devel" option.

1.3.2 (2009-11-12)
------------------

* issue 18: add support for external jslint.js.
* issue 29: pretty up the docs some.
* issue 32: clear up some non-partable tests.
* Update to JSLint 2009-10-04.
* Adds maxerr option.

1.3.1 (2009-07-30)
------------------

* issue 21: Emit full filename in ant errors.
* issue 22: Correct line & column numbers to be 1-based.
* issue 23: State total error count in build failure message.
* issue 24: make output more like javac for easier NetBeans parsing. (thanks, Ari Shamash!)
* Update to JSLint 2009-07-25.

1.3 (2009-07-23)
----------------

* **[INCOMPATIBILITY]** Rename package from net.happygiraffe.jslint to com.googlecode.jslint4java. This means that the antlib url is now `antlib:com.googlecode.jslint4java`.
* Add support for the indent option.
* Switch build to maven.
* Update to JSLint 2009-07-08.

1.2.1 (2008-09-07)
------------------

* Recompile with Java 5.

1.2 (2008-09-07)
----------------

* **[INCOMPATIBILITY]** Rewrite the ant task so that it always uses filesets.
* **[INCOMPATIBILITY]** Rewrite the ant task so that it always uses filesets.
* **[INCOMPATIBILITY]** Move antlib to be antlib:net.happygiraffe.jslint.
* Update to JSLint 2008-09-04.
* Add a `report()` call to get at `JSLINT.report()`.
* Add in a formatter subelement to the jslint ant task. Output can now be in either XML or plain text and may be written to a file.
* **[INCOMPATIBILITY]** Default to failing the build if all files do not pass JSLint. Add a haltonfailure attribute to disable this.

1.1 (2007-07-30)
----------------

* Update to JSLint 2007-07-29.
* Fixed Issue 1, a NullPointerException when encountering a fatal error. Many thanks to Rod McChesney for pointing this out.
* Added an Ant task to run JSLint as part of the build. See the javadoc for details.
* Added a Ruby script to automatically extract options & descriptions from JSLint.
* All option descriptions now start with upper case.
* Added a proper distribution (& src dist) to the build script.
* Added a `resetOptions()` call to JSLint.
* Switch to a more normal Rhino function call in JSLint.lint().

1.0 (2007-07-16)
----------------

* original version
58 changes: 58 additions & 0 deletions bin/jslint4java-2.0.2/README.markdown
@@ -0,0 +1,58 @@
jslint for java <http://code.google.com/p/jslint4java/>
=======================================================

This is a java wrapper around the fabulous tool by Douglas Crockford, jslint
(See <http://jslint.com/>). It provides a simple interface for detecting
potential problems in JavaScript code.

You can run it on the command line:

% java -jar jslint4java-2.0.2.jar application.js
jslint:application.js:11:9:Line breaking error ')'.
jslint:application.js:11:10:Missing semicolon.

There are a multitude of options; try `--help` for more details.

The output is colon separated fields. The fields are:

* "jslint"
* the file name
* the line number (starting at zero)
* the character number (starting at zero)
* the problem that was found

You may also use the jar as an ant task. The quickest way to get started is
to drop it in `~/.ant/lib`. See `docs/ant.html` for more details.

**NB:** The packaged jar file includes a builtin version of rhino (a JavaScript
engine). If this causes trouble, you can download a standalone version
through the maven repository.

If you wish to use jslint4java from within Java, please use a maven dependency:

<dependency>
<groupId>com.googlecode.jslint4java</groupId>
<artifactId>jslint4java</artifactId>
<version>2.0.2</version>
</dependency>

If you have any comments or queries, please send them to `dom [at] happygiraffe.net`.

This software is licenced under the BSD licence (see LICENCE.txt).

Patches
=======

If you'd like to change jslint4java, the best way to do so is via github. Fork the [main repository](https://github.com/happygiraffe/jslint4java), make your changes and submit a [pull request](http://help.github.com/pull-requests/).

If you don't wish to use github, just clone the repository and submit patches over email.

$ git clone git://github.com/happygiraffe/jslint4java.git
$ … hack, hack, hack …
$ git send-email origin

Please try to follow the existing code style when making changes.

You should ensure that the existing test and build works before submitting patches:

$ mvn -Pdist clean verify

0 comments on commit 9cfc7f4

Please sign in to comment.