/* jshint node: true */
'use strict';

var SassLinter = require('broccoli-sass-lint');
var mergeTrees = require('broccoli-merge-trees');

module.exports = {
  name: 'ember-cli-sass-lint',

  included: function(app) {
    if (!app.isTestingSassLintAddon) {
      this._super.included(app);
    }

    this.app = app;
    this.sassLintOptions = app.options.sassLint || {};
  },

  lintTree: function(type, tree) {
    var formattedResults, mergedTrees, results;

    if (type === 'app') {
      mergedTrees = mergeTrees([this.app.trees.styles]);

      return new SassLinter(mergedTrees, this.sassLintOptions);
    } else {
      return tree;
    }
  },
};

/* jshint node: true */
'use strict';

var SassLinter = require('broccoli-sass-lint');
var mergeTrees = require('broccoli-merge-trees');

module.exports = {
  name: 'ember-cli-sass-lint',

  included: function(app) {
    if (!app.isTestingSassLintAddon) {
      this._super.included(app);
    }

    this.app = app;
    this.sassLintOptions = app.options.sassLint || {};
  },

  lintTree: function(type, tree) {
    var mergedTrees;

    if (type === 'app') {
      mergedTrees = mergeTrees([this.app.trees.styles]);

      return new SassLinter(mergedTrees, this.sassLintOptions);
    } else {
      return this.app.trees.styles;
    }
  },
};

Fix "No tests were run"
Fix "No tests were run"

After including this packing in our ember app's package.json, was seeing:

```
1..0
# tests 0
# pass  0
# fail  0

# ok
No tests were run, please check whether any errors occurred in the page
```

Config in `ember-cli-build.js`:
```
sassLint: {
  disableTestGenerator: true
}
```

Setup:
```
ember -v
version: 1.13.8
Could not find watchman, falling back to NodeWatcher for file system events.
Visit http://www.ember-cli.com/user-guide/#watchman for more info.
node: 0.12.7
npm: 2.13.4
os: darwin x64
```