1 | |||
2 | 1 | var fs = require('fs'); |
|
3 | 1 | var glob = require('glob'); |
|
4 | 1 | var globAll = require('glob-all'); |
|
5 | 1 | var path = require('path'); |
|
6 | 1 | var extend = require('util')._extend; |
|
7 | 1 | var format = require('string-template'); |
|
8 | 1 | var frontMatter = require('front-matter'); |
|
9 | |||
10 | 1 | module.exports = function(value, config, cb, pl) { |
|
11 | 2 | var data = getChangeLog (value, config, pl); |
|
12 | 2 | cb(null, processTree(data)); |
|
13 | } |
||
14 | |||
15 | 1 | module.exports.config = { |
|
16 | verbose: false |
||
17 | } |
||
18 | |||
19 | 1 | module.exports.search = function(items, link) { |
|
0 ignored issues
–
show
|
|||
20 | 1 | var results = []; |
|
21 | // this => collider |
||
22 | /* results.push({ |
||
23 | name: name, |
||
24 | type: 'sass ' + type, |
||
25 | description: description, |
||
26 | link: link + hash |
||
27 | }); */ |
||
28 | |||
29 | 1 | return results; |
|
30 | } |
||
31 | |||
32 | |||
33 | function getChangeLog(value, config, pl) { |
||
34 | 2 | if (!fs.existsSync(value)) return false; |
|
35 | 1 | var changelogFile = frontMatter(fs.readFileSync(value).toString()); |
|
36 | 1 | var srcTemplate = ''+changelogFile.body+''; |
|
37 | 1 | var result = pl.markdown.render(srcTemplate); |
|
38 | 1 | return result; |
|
39 | } |
||
40 | |||
41 | |||
42 | function processTree(tree) { |
||
43 | |||
44 | // ... my tree assignment stuff |
||
45 | |||
46 | 2 | return tree; //my_stuff; |
|
47 | } |
||
48 | |||
49 |
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.