Skip to content

Commit

Permalink
Include Nodelint.JS config for project linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Sannis committed Sep 9, 2010
1 parent 067e7eb commit 2b4a9dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 3 additions & 0 deletions nodelint.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
var options = {
indent: 2
};
10 changes: 4 additions & 6 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,16 @@ def build(bld):

def test(tst):
if not exists('./tools/nodeunit/lib/testrunner.js'):
print("\033[31mNodeunit doesn't exists.\033[39m\nYou should run `git submodule update --init` before run tests.");
exit(1);
print("\033[31mNodeunit doesn't exists.\033[39m\nYou should run `git submodule update --init` before run tests.")
exit(1)
else:
Utils.exec_command('./tools/run-tests.sh')

def lint(lnt):
# Bindings C++ source code
Utils.exec_command('cpplint ./src/*.h ./src/*.cc')
# Bindings javascript code
Utils.exec_command('nodelint ./mysql-libmysqlclient.js')
# Bindings tests
Utils.exec_command('nodelint ./tools/*.js ./tools/tests/*.js')
# Bindings javascript code, tools and tests
Utils.exec_command('nodelint --config ./nodelint.cfg ./mysql-libmysqlclient.js ./tools/*.js ./tools/tests/*.js')

def shutdown():
# HACK to get bindings.node out of build directory.
Expand Down

0 comments on commit 2b4a9dc

Please sign in to comment.