Skip to content

eXist-db/xqlint

 
 

Repository files navigation

XQLint - XQuery Code Quality Tool.

XQLint parses XQuery files and returns errors and warnings based on semantic analysis. The XQuery parser is generated using REx Parser Generator (http://www.bottlecaps.de/rex/).

Dependencies

npm install walk amd-loader asyncjs

Generate the parser

The parser can be generated programmatically by using the following XQuery file:

zorba -q generate_xquery_parser.xq -f

Or via http://www.bottlecaps.de/rex/:

REx -ll 2 -backtrack -tree -javascript -a xqlint XQueryParser.ebnf

Running the test suite

Parser test suite

node run_tests.js --keep-going

To parse a particular XQuery file:

node run_tests.js -f filename

For instance:

node run_tests.js -f queries/zorba/boolean/compare0.xq

Unit tests

node tests/all.js

Who is using this project?

ACE, aka the Cloud9 editor (https://github.com/ajaxorg/ace), is using this parser to perform XQuery syntax checking and semantic highlighting of the source code.

About

XQuery Quality Checker

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • XQuery 42.6%
  • HTML 36.3%
  • JavaScript 21.0%
  • Other 0.1%