Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable autobrief in doxygen #2359

Merged
merged 2 commits into from
May 16, 2016
Merged

Conversation

sherm1
Copy link
Member

@sherm1 sherm1 commented May 16, 2016

Per discussion in issue #2051, this PR enables JAVADOC_AUTOBRIEF in the Drake Doxyfiles for C++ and Matlab.

What this means is that the first sentence of every doxygen comment will automatically be used as though it were preceded by @brief and followed by a blank line. This provides a one-line brief for every class and method that has even a short doxygen comment.

Doxygen considers a sentence to end at the first period -- use \. if you want a period included in the brief or want to have a multi-sentence brief. An explicit @brief will be harmlessly ignored, but those can be removed as code is updated.

Possible source of trouble: explicit @briefs that were previously multi-sentence will be reduced to just their first sentence if no \. is used, although the rest of the brief will still appear in the More... section.

Reviews, please:
Feature: @liangfok
Platform: @jwnimmer-tri


This change is Reviewable   Multiple assignees: @jwnimmer-tri jwnimmer-tri, @liangfok liangfok

@jwnimmer-tri jwnimmer-tri self-assigned this May 16, 2016
@jwnimmer-tri
Copy link
Collaborator

+@jwnimmer-tri platform.

Previously, sherm1 (Michael Sherman) wrote…

Enable autobrief in doxygen

Per discussion in issue #2051, this PR enables JAVADOC_AUTOBRIEF in the Drake Doxyfiles for C++ and Matlab.

What this means is that the first sentence of every doxygen comment will automatically be used as though it were preceded by @brief and followed by a blank line. This provides a one-line brief for every class and method that has even a short doxygen comment.

Doxygen considers a sentence to end at the first period -- use \. if you want a period included in the brief or want to have a multi-sentence brief. An explicit @brief will be harmlessly ignored, but those can be removed as code is updated.

Possible source of trouble: explicit @briefs that were previously multi-sentence will be reduced to just their first sentence if no \. is used, although the rest of the brief will still appear in the More... section.

Reviews, please:

Feature: @liangfok

Platform: @jwnimmer-tri


Review status: 0 of 2 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@jwnimmer-tri
Copy link
Collaborator

:lgtm:

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

+@jwnimmer-tri platform.


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@liangfok
Copy link
Contributor

+@liangfok feature. Sorry I did not see this PR being assigned to me until now. Still review it shortly.

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

:lgtm:


Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@liangfok liangfok assigned liangfok and unassigned jwnimmer-tri May 16, 2016
@liangfok
Copy link
Contributor

Quick question in case someone knows and can respond before I actually test this on my local machine: What happens if the first sentence of a comment block spans multiple lines? Will AUTOBRIEF truncate it?

Previously, liangfok (Chien-Liang Fok) wrote…

+@liangfok feature. Sorry I did not see this PR being assigned to me until now. Still review it shortly.


Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@sherm1
Copy link
Member Author

sherm1 commented May 16, 2016

@liangfok: AUTOBRIEF doesn't pay attention to line breaks, it just looks for a period. So multiline briefs work fine, but multi-sentence ones (or sentences with abbreviations like Ph.D.) need to escape the period with a backslash.

Previously, liangfok (Chien-Liang Fok) wrote…

Quick question in case someone knows and can respond before I actually test this on my local machine: What happens if the first sentence of a comment block spans multiple lines? Will AUTOBRIEF truncate it?


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending.


Comments from Reviewable

@liangfok
Copy link
Contributor

@sherm1: Thanks! I actually just verified your statement on my local machine. Thus, this PR :lgtm_strong: .

Previously, sherm1 (Michael Sherman) wrote…

@liangfok: AUTOBRIEF doesn't pay attention to line breaks, it just looks for a period. So multiline briefs work fine, but multi-sentence ones (or sentences with abbreviations like Ph.D.) need to escape the period with a backslash.


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending.


Comments from Reviewable

@sherm1
Copy link
Member Author

sherm1 commented May 16, 2016

Merging although build hasn't completed yet since this doesn't affect the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants