pugjs / pug-lint

An unopinionated and configurable linter and style checker for Pug
ISC License
228 stars 51 forks source link

linter: Optimize checkDirectory #95

Closed TimothyGu closed 8 years ago

TimothyGu commented 8 years ago

Using the following script

var Linter = require('./lib/linter');
var linter = new Linter();
linter.configure({});

console.time('checkDirectory');
linter.checkDirectory('node_modules');
console.timeEnd('checkDirectory');

a speed-up of 50× can be observed on Windows, where file I/O is usually slow.

codecov-io commented 8 years ago

Current coverage is 100%

Merging #95 into master will not change coverage

@@           master   #95   diff @@
===================================
  Files          49    49          
  Lines         913   915     +2   
  Methods         0     0          
  Messages        0     0          
  Branches        0     0          
===================================
+ Hits          913   915     +2   
  Misses          0     0          
  Partials        0     0          

Powered by Codecov. Last updated by ed63c45...b632741