Skip to content

Commit 12be53c

Browse files
committed
@memberof scope defaults to static
1 parent e67b5d2 commit 12be53c

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

lib/hierarchy.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,7 @@ function inferHierarchy(comments) {
7777
break;
7878

7979
default:
80-
if (!comment.scope) {
81-
comment.errors.push({
82-
message: 'found memberof but no @scope, @static, or @instance tag'
83-
});
84-
continue;
85-
}
86-
parent.members[comment.scope].push(comment);
80+
parent.members[comment.scope || 'static'].push(comment);
8781
break;
8882
}
8983

test/lib/hierarchy.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ test('hierarchy', function (t) {
3737
/**
3838
* @name MAGIC_NUMBER
3939
* @memberof Class
40-
* @static
4140
*/
4241

4342
/**
@@ -77,23 +76,3 @@ test('hierarchy - missing memberof', function (t) {
7776
}, 'correct error message');
7877
t.end();
7978
});
80-
81-
test('hierarchy - missing scope', function (t) {
82-
var result = evaluate(function () {
83-
/**
84-
* @name Class
85-
* @class
86-
*/
87-
88-
/**
89-
* @name test
90-
* @memberof Class
91-
*/
92-
});
93-
94-
t.equal(result.length, 2);
95-
t.deepEqual(result[1].errors[0], {
96-
message: 'found memberof but no @scope, @static, or @instance tag'
97-
}, 'correct error message');
98-
t.end();
99-
});

0 commit comments

Comments
 (0)