Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsduck
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
extjs
jsduck
Commits
5407cc87
Commit
5407cc87
authored
11 years ago
by
Rene Saarsoo
Browse files
Options
Downloads
Patches
Plain Diff
Mark all auto-merged fields as auto-detected.
parent
47261b3b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/jsduck/merger.rb
+7
-3
7 additions, 3 deletions
lib/jsduck/merger.rb
spec/aggregator_chainable_spec.rb
+4
-0
4 additions, 0 deletions
spec/aggregator_chainable_spec.rb
with
11 additions
and
3 deletions
lib/jsduck/merger.rb
+
7
−
3
View file @
5407cc87
...
...
@@ -55,11 +55,15 @@ module JsDuck
h
[
key
]
=
value
unless
h
.
has_key?
(
key
)
||
Merger
::
explicit?
(
key
)
end
# Add all items in code not already in result.
# But only if the explicit and auto-detected names don't conflict.
# Add all items in code not already in result and mark them as
# auto-detected. But only if the explicit and auto-detected
# names don't conflict.
if
DocsCodeComparer
.
matches?
(
docs
,
code
)
code
.
each_pair
do
|
key
,
value
|
h
[
key
]
=
value
unless
h
.
has_key?
(
key
)
||
Merger
::
explicit?
(
key
)
unless
h
.
has_key?
(
key
)
||
Merger
::
explicit?
(
key
)
h
[
key
]
=
value
DocsCodeComparer
.
mark_autodetected
(
h
,
key
)
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
spec/aggregator_chainable_spec.rb
+
4
−
0
View file @
5407cc87
...
...
@@ -197,6 +197,10 @@ describe JsDuck::Aggregator do
cls
[
:members
][
0
][
:chainable
].
should
==
true
end
it
"marks :chainable field as autodetected"
do
cls
[
:members
][
0
][
:autodetected
][
:chainable
].
should
==
true
end
it
"adds @return {MyClass} this"
do
cls
[
:members
][
0
][
:return
][
:type
].
should
==
"MyClass"
cls
[
:members
][
0
][
:return
][
:doc
].
should
==
"this"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment