Skip to content

Add ddoc style comments to all diagnostic functions.#7812

Merged
dlang-bot merged 1 commit intodlang:masterfrom
ibuclaw:ddocerrors
Jan 31, 2018
Merged

Add ddoc style comments to all diagnostic functions.#7812
dlang-bot merged 1 commit intodlang:masterfrom
ibuclaw:ddocerrors

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jan 30, 2018

Mostly mechanical / repetitive comments.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

* Params:
* loc = location of error
* format = printf-style format specification
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I would care much about (and it makes sense in DMD's ugly codebase), but as an FYI we recently defined documentation strings in the DStyle.


// header is "Error: " by default (see errors.h)
/**
* Same as $(D error), but takes a va_list parameter, and optionally additional message prefixes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: Phobos is slowly converted to use backticks instead of $(D ...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you prefer that changed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was just an FYI. I have given up hope for a pretty DMD codebase long ago.

Copy link
Contributor

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc improvements are always welcome!

@JinShil
Copy link
Contributor

JinShil commented Jan 30, 2018

Per https://dlang.org/dstyle.html#phobos_documentation

Documentation comments should not have leading stars or zeroes on each line.

But I don't think that should hold up this PR.

@wilzbach
Copy link
Contributor

But I don't think that should hold up this PR.

Yes, it was just an FYI as it was added four days ago and I assume it's not very known: dlang/dlang.org#2129

Anyhow the DDoc failures are a holdup:

dmd/errors.d(41): Warning: Ddoc: parameter count mismatch
dmd/errors.d(55): Warning: Ddoc: parameter count mismatch
dmd/errors.d(71): Warning: Ddoc: parameter count mismatch
dmd/errors.d(90): Warning: Ddoc: parameter count mismatch
dmd/errors.d(104): Warning: Ddoc: parameter count mismatch
dmd/errors.d(120): Warning: Ddoc: parameter count mismatch
dmd/errors.d(120): Warning: Ddoc: parameter count mismatch
dmd/errors.d(135): Warning: Ddoc: parameter count mismatch
dmd/errors.d(150): Warning: Ddoc: parameter count mismatch

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 31, 2018

Anyhow the DDoc failures are a holdup:

I did have a quick look in phobos/druntime, and I couldn't see any existing documentation for ellipses.

Blindly trying ...

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 31, 2018

@JinShil
Copy link
Contributor

JinShil commented Jan 31, 2018

I restarted Jenkins

* Print additional details about a warning message.
* Doesn't increase the error count or print an additional warning prefix.
* Params:
* Params:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double params.

src/dmd/errors.d Outdated
}

/**
* Print additional details about an error mesage.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

message

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 31, 2018

@WalterBright - I ran the source through aspell and picked up a couple of other spelling mistakes.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 31, 2018

/**
* Embed these highlighting commands in the text stream.
* HIGHLIGHT.Escape indicats a Color follows.
* HIGHLIGHT.Escape indicates a Color follows.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backticks around HIGHLIGHT.Escape.

import dmd.root.rmem;
import dmd.console;

/**********************
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really necessary to do this. The number of *'s is not consistent anywhere in the source code, and it hardly matters.

@dlang-bot dlang-bot merged commit b879b1f into dlang:master Jan 31, 2018
@ibuclaw ibuclaw deleted the ddocerrors branch January 31, 2018 13:47
@ibuclaw
Copy link
Member Author

ibuclaw commented Feb 1, 2018

Yep, although the compiler complains if ...is missing, it doesn't do a good job formatting it.

Ah I've just realised that this is a ddox bug. The ddoc page is fine. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants