lp:yard
- Get this branch:
- bzr branch lp:yard
Branch merges
Branch information
Import details
This branch is an import of the HEAD branch of the Git repository at https://github.com/lsegal/yard.
Last successful import was .
Recent revisions
- 2512. By Loren Segal
-
Workaround for ruby-bug:11485
Since https:/
/bugs.ruby- lang.org/ issues/ 11485 has been open for
a year, this patch adds a nil check to work around the bug. Note
that this fix makes an assumption about the nl token length which
may lead to other incorrect parsing.Fixes #835
Fixes #979 - 2511. By Loren Segal
-
Fix embedding of all classes with --embed-mixins
Fixes an issue where all superclass class objects would be
embedded in subclasses as a mixin when --embed-mixins was passed
in.Fixes #814
- 2509. By Loren Segal
-
Disallow type specification to begin after newline
This change disallows the following tag formatting to minimize
ambiguity when differentiating tag types from body text:@param name
[type, specification, here] docstring here
@param
[other, type, specification] name docstring hereSupporting the above two examples make it impossible to distinguish
reftags from directives:@!attribute
(see Foo)Because (see Foo) would otherwise be parsed as a type specification.
If an opening character is detected before a newline, YARD will parse
the specification completely. In other words, the following behavior
is still supported:@param name [Long, Type, Specification,
Here] and more docstring text hereOr even:
@param long_parameter_name [
Type, Specification, Here] docstringThis is a breaking change but is unlikely to have wide impact
due to the nature of the formatting. It is possible to implement
this in a non-breaking way by only enabling this parsing style
on directives, but the extra complexity is not seen as worth it
given the extremely low impact.Fixes #726
- 2508. By Loren Segal
-
DSL handler won't create method if attached macro has directives
YARD will no longer attempt to create a method object for a DSL
style declaration with code comments if the declaration has an
attached macro with directive text. If directives are used in
an attached macro, you must opt-in to @!method or @!attribute
to create the code object yourself. If you do not use a directive,
the DSL handler will create a method for you. The following
two scenarios now work:class Foo
# @!macro attach
# Docstring for $1
def self.attach(x) endattach :bar # creates method Foo#bar
# @!macro attach2
# @!method macro_$1(x)
def self.attach2(x) endattach2 :baz # creates method Foo#macro_baz
endThe following will NO LONGER create a method. This was previously
undefined behavior (since macros themselves are not meant to create
objects):class Foo
# @!macro attach
# A documentation string
# @!visibility private
def self.attach(x) endattach :bar
# Foo#bar has not been created.
# The attach macro has a visibility directive,
# but no @!method directive to create the object.
# YARD will set visibility, but nothing else.
endFixes #661
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)