Skip to content
Snippets Groups Projects
Commit 5c4892a6 authored by ciaranj's avatar ciaranj Committed by Marijn Haverbeke
Browse files

Allow linter to run on windows


Node provides some cross-platform utility methods to enable safe
path traversal.

This change merely swaps out a hardcoded '/' (unix path separator)
to use one of these methods.

An alternative strategy would be to use the constant 'path.sep' but
this felt 'cleaner'.

Signed-off-by: default avatarciaranj <ciaranj@gmail.com>
parent 2a4c96f0
No related branches found
No related tags found
Loading
#!/usr/bin/env node
var lint = require("../test/lint/lint");
var lint = require("../test/lint/lint"),
path = require("path");
if (process.argv.length > 2) {
lint.checkDir(process.argv[2]);
} else {
process.chdir(__dirname.slice(0, __dirname.lastIndexOf("/")));
process.chdir(path.resolve(__dirname, ".."));
lint.checkDir("lib");
lint.checkDir("mode");
lint.checkDir("addon");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment