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

doc: make the style of notes consistent #13133

Closed
wants to merge 3 commits into from

Conversation

aqrln
Copy link
Contributor

@aqrln aqrln commented May 20, 2017

Make the style of "Note:" paragraphs consistent and document the guidelines in doc/STYLE_GUIDE.md.

Fixes: #13131

I picked the style that I find reasonable and which I had used once adding a note myself, but I don't have any strong opinions about the notes style except that it should be only one, so the formatting may be discussed in this PR.

Checklist
Affected core subsystem(s)

doc

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label May 20, 2017
@@ -115,7 +115,7 @@ if (cluster.isMaster) {
d.on('error', (er) => {
console.error(`error ${er.stack}`);

// Note: we're in dangerous territory!
// Note: We're in dangerous territory!
Copy link
Contributor Author

@aqrln aqrln May 20, 2017

Choose a reason for hiding this comment

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

Note: that falls outside the scope of this PR, but "we" shouldn't have been used here at all. I'll reword all of the comments in this example in another PR.

@@ -142,7 +142,7 @@ myEmitter.emit('error', new Error('whoops!'));

To guard against crashing the Node.js process, a listener can be registered
on the [`process` object's `uncaughtException` event][] or the [`domain`][] module
can be used. (_Note, however, that the `domain` module has been deprecated_)
can be used. _(Note, however, that the `domain` module has been deprecated.)_
Copy link
Contributor Author

Choose a reason for hiding this comment

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

And what about this case, to my perception, this is not a note as in "Note:", but rather just a regular sentence. I fixed the stylistic mistakes while I was here, though.

Copy link
Contributor

@refack refack May 20, 2017

Choose a reason for hiding this comment

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

Agreed. AFAICT this is an editorial comment that happens to start with the word "note".
But it should be "Note however," no first comma.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not a native speaker, but as for me, the punctuation around "however" is pretty valid here as is.

Copy link
Member

Choose a reason for hiding this comment

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

I agree that Note, however, that... is perfectly fine (and to my sense, preferable). I do think that note should probably _not* be italicized, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack.

Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

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

LGTM.
Rubber stamp completeness...

@@ -58,6 +58,11 @@
* References to constructor functions should use PascalCase
* References to constructor instances should be camelCased
* References to methods should be used with parentheses: `socket.end()` instead of `socket.end`
* In order to make a note that a reader should draw special attention to,
Copy link
Member

Choose a reason for hiding this comment

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

I think this would be somewhat better as To draw special attention to a note,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks.

doc/api/net.md Outdated

* All [`net.Socket`][] are set to `SO_REUSEADDR` (See [socket(7)][] for
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I understand this goes against the style defined above but isn't it better to keep the bulleted list here instead of repeating Note: in two consecutive lines?

doc/api/tls.md Outdated
generated from `process.argv`, other APIs that create secure contexts
have no default value.

**Note:** [`tls.createServer()`][] sets the default value of the
Copy link
Member

Choose a reason for hiding this comment

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

Nit: it might makes sense to also use a bulleted list here.

@aqrln
Copy link
Contributor Author

aqrln commented May 22, 2017

ping @nodejs/collaborators

Before we really start enforcing it, I think we need to make sure that others are acknowledged about this and I'd like to hear more opinions about the preferred style, specifically re: questions like bold vs italic, should we group consequent notes into unordered lists, etc.

@refack
Copy link
Contributor

refack commented May 22, 2017

Just a few refs that use **Note:**

@watilde
Copy link
Member

watilde commented May 22, 2017

+1 on this, and it would be nicer if we could have this addition as one of the actual link rules.

@@ -58,6 +58,10 @@
* References to constructor functions should use PascalCase
* References to constructor instances should be camelCased
* References to methods should be used with parentheses: `socket.end()` instead of `socket.end`
* To draw special attention to a note, adhere to the following guidelines:
Copy link
Member

Choose a reason for hiding this comment

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

To be quite honest, I generally prefer the *Note*: style and have been incrementally working towards that for quite some time. I guess this is fine tho. Mildly -0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I said,

I don't have any strong opinions about the notes style except that it should be only one, so the formatting may be discussed in this PR.

I am completely fine with changing the style to what you prefer, a Vim macro will chew it easily 😄

@aqrln
Copy link
Contributor Author

aqrln commented May 22, 2017

@watilde yeah, I am really looking forward to see the markdown linter landed. Sure, we can make a rule for that. Aside from this PR, ensuring that we use 80-character wrapping (except changelogs) and em-dashes are on my to-do list.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

aqrln added 3 commits May 24, 2017 17:00
Make the style of "Note:" paragraphs consistent and document the
guidelines in `doc/STYLE_GUIDE.md`.

Fixes: nodejs#13131
@aqrln
Copy link
Contributor Author

aqrln commented May 24, 2017

I've updated the PR. The first commit is the original commit rebased onto master with conflicts resolved and with a couple of notes that I missed before (or that weren't present before the rebase, idk) updated to conform to the general style. The second commit changes the style to what @jasnell prefers and the third commit follows the suggestion by @lpinca to use bulleted lists for consecutive notes.

@refack @lpinca @watilde @mhdawson can you please take another look and say whether this still LGTY? Thanks!

@refack
Copy link
Contributor

refack commented May 24, 2017

-0.5 on *Note*:
+1 on **Note:**

Waiting for consensus on bullet lists for https://github.com/nodejs/node/pull/13173/files#diff-acabf706a8aa070a8796e3573f7e4678

@refack refack mentioned this pull request May 24, 2017
4 tasks
Copy link
Contributor

@sam-github sam-github left a comment

Choose a reason for hiding this comment

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

Nice, thanks.

@lpinca
Copy link
Member

lpinca commented May 24, 2017

Still LGTM.

@addaleax
Copy link
Member

addaleax commented May 24, 2017

Landed in 04e9dcb3f392f66b3d1e5c006f7be227297f8b8c

@addaleax addaleax closed this May 24, 2017
@addaleax
Copy link
Member

Reopened, seems like I was too fast here.

@addaleax addaleax reopened this May 24, 2017
@refack
Copy link
Contributor

refack commented May 24, 2017

@jasnell how strongly do you feel on the *Note* vs **Note** style? Seems to me like it's only the two of us that have a preference...

@addaleax
Copy link
Member

I’m +1 to *Note*.

@refack
Copy link
Contributor

refack commented May 25, 2017

I yield. I see two explicit +1 for *Note*: and there's @Trott's #13131 (comment)

Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

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

👍 to *Note*: style.

@refack refack self-assigned this May 25, 2017
@refack
Copy link
Contributor

refack commented May 25, 2017

Landed in 2af49b6

refack pushed a commit to refack/node that referenced this pull request May 25, 2017
Make the style of "Note:" paragraphs consistent and document the
guidelines in `doc/STYLE_GUIDE.md`.

PR-URL: nodejs#13133
Fixes: nodejs#13131
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
@refack
Copy link
Contributor

refack commented May 25, 2017

Landed in 2af49b6

@refack refack closed this May 25, 2017
@aqrln aqrln deleted the doc-consistent-notes branch May 25, 2017 23:16
jasnell pushed a commit that referenced this pull request May 28, 2017
Make the style of "Note:" paragraphs consistent and document the
guidelines in `doc/STYLE_GUIDE.md`.

PR-URL: #13133
Fixes: #13131
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
@jasnell jasnell mentioned this pull request May 28, 2017
@MylesBorins
Copy link
Contributor

This does not land cleanly in LTS. Please feel free to manually backport. Please also feel free to replace do-not-land if it is being backported

@refack refack removed their assignment Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc: make the style of notes consistent