add README
authorChristian Weiske <cweiske@cweiske.de>
Wed, 9 Dec 2015 20:05:35 +0000 (21:05 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 9 Dec 2015 20:05:35 +0000 (21:05 +0100)
.gitignore
README.rst [new file with mode: 0644]

index ff72e2d08c7e284b7a0c34eef012f55628fea54d..4d82a7be1bcb98436d10b64a176ac2496e978658 100644 (file)
@@ -1,2 +1,3 @@
 /composer.lock
 /vendor
+/README.html
diff --git a/README.rst b/README.rst
new file mode 100644 (file)
index 0000000..351e1f8
--- /dev/null
@@ -0,0 +1,64 @@
+***********
+PHP-SQLlint
+***********
+
+Command line tool to validate (syntax check) SQL files.
+Primarily for MySQL ``.sql`` files.
+
+Can be used in git pre-commit hooks to catch errors.
+
+
+=====
+Usage
+=====
+::
+
+    $ ./bin/php-sqllint tests/files/create-missingcomma.sql 
+    Checking SQL syntax of tests/files/create-missingcomma.sql
+     Line 3, col 5 at "pid": A comma or a closing bracket was expected.
+     Line 3, col 13 at "11": Unexpected beginning of statement.
+     Line 3, col 17 at "DEFAULT": Unrecognized statement type.
+
+Emacs mode::
+
+    $ ./bin/php-sqllint -r emacs tests/files/create-noname.sql 
+    tests/files/create-noname.sql:1.12:Error: The name of the entity was expected.
+    tests/files/create-noname.sql:1.13:Error: A closing bracket was expected.
+    tests/files/create-noname.sql:1.13:Error: At least one column definition was expected.
+
+
+============
+Dependencies
+============
+- PEAR's `Console_Commandline`__
+- `udan11's SqlParser`__, which is used by `phpMyAdmin`__
+
+__ http://pear.php.net/package/Console_CommandLine
+__ https://github.com/udan11/sql-parser
+__ https://www.phpmyadmin.net/
+
+
+
+
+=================
+About PHP-SQLlint
+=================
+
+License
+=======
+``bdrem`` is licensed under the `AGPL v3`__ or later.
+
+__ http://www.gnu.org/licenses/agpl.html
+
+
+Homepage
+========
+Source code
+   http://git.cweiske.de/php-sqllint.git
+
+   Mirror: https://github.com/cweiske/php-sqllint
+
+
+Author
+======
+Written by Christian Weiske, cweiske@cweiske.de