Issues (117)

lib/adapters/tests.js (5 issues)

1
//
2
// @SOON: split up into testsass, testjs, testui
3
//
4 1
var fs          = require('fs');
5
6 1
module.exports = function(value, config, cb, pl) {
7 2
    var data = getPatternSpecs (value, config, pl);
8 2
    cb(null, processTree(data));
9
}
10
11 1
module.exports.config = {
12
    verbose: false
13
}
14
15 1
module.exports.search = function(items, link) {
0 ignored issues
show
The parameter link is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
The parameter items is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
16 1
    var results = [];
17
    // this => collider
18
    /* results.push({
19
        name: name,
20
        type: 'sass ' + type,
21
        description: description,
22
        link: link + hash
23
    }); */
24
25 1
    return results;
26
}
27
28
29
function getPatternSpecs(value, config, pl) {
0 ignored issues
show
The parameter pl is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
The parameter config is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
30 2
    if (!fs.existsSync(value)) return false;
0 ignored issues
show
Coding Style Best Practice introduced by
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.

Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later.

Consider:

if (a > 0)
    b = 42;

If you or someone else later decides to put another statement in, only the first statement will be executed.

if (a > 0)
    console.log("a > 0");
    b = 42;

In this case the statement b = 42 will always be executed, while the logging statement will be executed conditionally.

if (a > 0) {
    console.log("a > 0");
    b = 42;
}

ensures that the proper code will be executed conditionally no matter how many statements are added or removed.

Loading history...
31
    //var sourceFile = frontMatter(fs.readFileSync(value).toString());
32 1
    return {};
33
}
34
35
36
function processTree(tree) {
37
38
    // do stuff...
39
40 2
    return tree; //my_stuff;
41
}
42
43