kevinsawicki/grunt-lesslint — pull request #22 by jgable (2014-02-28 02:19:45+00:00)
Title: Refactor into classes and add faster caching with options.import

Closes #20

- Move logic for parsing and linting into new `LessFile` class
- Extend `LessFile` as `LessCachedFile` with caching specific implementation
- Move non grunt task files to tasks/lib to prevent being read by grunt
- Combine the imports contents with less file contents when calculating cache hash key
- Add extra tests for imports invalidation in `less-file-spec.coffee`

I know this is a big refactor, but the `less-lint-task.coffee` file was getting a little cramped. I moved the parsing and linting logic into classes that make it a little easier to unit test without grunt, but still kept all the existing unit tests. I'm hoping a subsequent PR will move the rest of the disparate error outputting functions to another class/file, but I feel like this is probably big enough for now.

Would really appreciate a review from @cvn and @kevinsawicki before I merge this in.