Skip to content

Start on conventions.md - #5

Closed
modmuss50 wants to merge 1 commit into
26.3from
feature/conventions
Closed

modmuss50 wants to merge 1 commit into
26.3from
feature/conventions

Conversation

@modmuss50

Copy link
Copy Markdown
Member

Please provide feedback, even after this has merged this document is not set in stone

@MildestToucan MildestToucan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Some nitpicks about the text rather than the conventions that may or may not be worth fixing.

The conventions themselves seem very reasonable to me.

Comment thread CONVENTIONS.md

Avoid descriptions such as `The position.` for `pos` or `The result.` for a return value.

## Start with a short summary

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: Only the first line of this section is related to starting with a short summary. The rest of the section is concerned with, respectively: terminology, American vs British English spelling and capitalization.

Either the section could be split, or its title and content could be centred around how to write documentation prose.

Comment thread CONVENTIONS.md

Link when it helps the reader find related documentation; repeating a link on every mention is unnecessary.

## Explain parameters and results only when needed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: Section overlaps a bit with the section on documenting only where it adds value, which explicitly uses obvious return values as an example of unnecessary documentation.

Unsure on how to remedy this (or if it's worth changing), but having two sections go over "only document when it helps the reader" in different regards feels a bit odd.

Comment thread CONVENTIONS.md

## Explain parameters and results only when needed

Use `@param`, `@return`, and `@throws` when they help the reader understand a parameter, result, or failure condition. Repeating information from the prose is fine when it makes the documentation clearer or easier to use. Parameter and return descriptions should be short phrases without an initial capital or final period.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
Use `@param`, `@return`, and `@throws` when they help the reader understand a parameter, result, or failure condition. Repeating information from the prose is fine when it makes the documentation clearer or easier to use. Parameter and return descriptions should be short phrases without an initial capital or final period.
Use `@param`, `@return`, and `@throws` when they help the reader understand a parameter, result, or failure condition, respectively. Repeating information from the prose is fine when it makes the documentation clearer or easier to use. Parameter and return descriptions should be short phrases without an initial capital or final period.

@cassiancc cassiancc mentioned this pull request Nov 2, 2026
Comment thread CONVENTIONS.md

Use American English spelling, such as “color” rather than “colour”.

Use lowercase for ordinary references to game content, such as “snow fox” rather than “Snow Fox”. Preserve capitalization when referring to code identifiers.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The developers do capitalise these words in official documents, such as in snapshot articles, so if you also want to stay consistent with Minecraft terminology these words should be capitalised imo

Comment thread CONVENTIONS.md

## Explain parameters and results only when needed

Use `@param`, `@return`, and `@throws` when they help the reader understand a parameter, result, or failure condition. Repeating information from the prose is fine when it makes the documentation clearer or easier to use. Parameter and return descriptions should be short phrases without an initial capital or final period.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think it would be useful to require a specific tag order (this Oracle article is a useful reference) so all Javadocs stay consistently ordered. You could also disallow certain tags like @exception (as @throws is preferred) or @author.

Comment thread CONVENTIONS.md

Inspired by [Yarn’s conventions](https://github.com/FabricMC/yarn/blob/1.21.11/CONVENTIONS.md) and [Effective Dart’s documentation guide](https://dart.dev/effective-dart/documentation).

For Markdown Javadoc syntax, see Oracle’s [Markdown in Documentation Comments](https://docs.oracle.com/en/java/javase/26/javadoc/using-markdown-documentation-comments.html) guide.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: use either the currently latest available Java version (27) or 25 as that's the current LTS and version Minecraft uses at the moment.

Comment thread CONVENTIONS.md

```markdown
@param namespace the namespace, restricted to `[a-z0-9_.-]`
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Might be better to prefix these with the Javadoc comment so it's a little clearer:

/// @param namespace the namespace, restricted to `[a-z0-9_.-]`

Comment thread CONVENTIONS.md

## Start with a short summary

Write a concise first sentence that makes sense on its own. Capitalize it and end it with a period. For methods, start with a verb such as “Returns”, “Sets”, or “Removes”. Add a blank line before further explanation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think the document should use ' and " instead of fancy quotes. This might also be a good thing to mention here so people use the correct ones in the Javadocs.
However, in lists like these I would recommend italic words instead of quotes so the sentences don't get cluttered with punctuation marks. On top of that, I would write the examples in lowercase despite being noted to be at the start of a sentence, as they are still part of this sentence.

Suggested change
Write a concise first sentence that makes sense on its own. Capitalize it and end it with a period. For methods, start with a verb such as “Returns”, “Sets”, or “Removes”. Add a blank line before further explanation.
Write a concise first sentence that makes sense on its own. Capitalize it and end it with a period. For methods, start with a verb such as *returns*, *sets*, or *removes*. Add a blank line before further explanation.

Comment thread CONVENTIONS.md

Use plain English and terminology consistent with Minecraft and nearby documentation. Describe behavior from the caller’s perspective rather than walking through the implementation.

Use American English spelling, such as “color” rather than “colour”.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same formatting as mentioned earlier, italic words rather than quotes.

Suggested change
Use American English spelling, such as “color” rather than “colour”.
Use American English spelling, such as *color* rather than *colour*.

Comment thread CONVENTIONS.md

Write a concise first sentence that makes sense on its own. Capitalize it and end it with a period. For methods, start with a verb such as “Returns”, “Sets”, or “Removes”. Add a blank line before further explanation.

Use plain English and terminology consistent with Minecraft and nearby documentation. Describe behavior from the caller’s perspective rather than walking through the implementation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Normal quotes instead of a fancy quotes as mentioned before.

Suggested change
Use plain English and terminology consistent with Minecraft and nearby documentation. Describe behavior from the caller’s perspective rather than walking through the implementation.
Use plain English and terminology consistent with Minecraft and nearby documentation. Describe behavior from the caller's perspective rather than walking through the implementation.

Comment thread CONVENTIONS.md

Use American English spelling, such as “color” rather than “colour”.

Use lowercase for ordinary references to game content, such as “snow fox” rather than “Snow Fox”. Preserve capitalization when referring to code identifiers.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same formatting as mentioned earlier, italic words rather than quotes. (The other comment about the capitalisation still stands)

Suggested change
Use lowercase for ordinary references to game content, such as “snow fox” rather than “Snow Fox”. Preserve capitalization when referring to code identifiers.
Use lowercase for ordinary references to game content, such as *snow fox* rather than *Snow Fox*. Preserve capitalization when referring to code identifiers.

Comment thread CONVENTIONS.md
Comment on lines +63 to +65
Inspired by [Yarn’s conventions](https://github.com/FabricMC/yarn/blob/1.21.11/CONVENTIONS.md) and [Effective Dart’s documentation guide](https://dart.dev/effective-dart/documentation).

For Markdown Javadoc syntax, see Oracle’s [Markdown in Documentation Comments](https://docs.oracle.com/en/java/javase/26/javadoc/using-markdown-documentation-comments.html) guide.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Normal quotes instead of a fancy quotes as mentioned before.

Suggested change
Inspired by [Yarn’s conventions](https://github.com/FabricMC/yarn/blob/1.21.11/CONVENTIONS.md) and [Effective Dart’s documentation guide](https://dart.dev/effective-dart/documentation).
For Markdown Javadoc syntax, see Oracle’s [Markdown in Documentation Comments](https://docs.oracle.com/en/java/javase/26/javadoc/using-markdown-documentation-comments.html) guide.
Inspired by [Yarn's conventions](https://github.com/FabricMC/yarn/blob/1.21.11/CONVENTIONS.md) and [Effective Dart's documentation guide](https://dart.dev/effective-dart/documentation).
For Markdown Javadoc syntax, see Oracle's [Markdown in Documentation Comments](https://docs.oracle.com/en/java/javase/26/javadoc/using-markdown-documentation-comments.html) guide.

Comment thread CONVENTIONS.md
Use [java.util.List#copyOf(java.util.Collection)] to create an unmodifiable copy.
```

Use `#` to reference a member of the current class, such as `[#clear()]`. Use `[clearing the entries][#clear()]` for a custom label in plain text, or a block tag such as `@see #clear()` for a related reference. Use ordinary Markdown links such as `[label](https://example.com)` for external URLs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
Use `#` to reference a member of the current class, such as `[#clear()]`. Use `[clearing the entries][#clear()]` for a custom label in plain text, or a block tag such as `@see #clear()` for a related reference. Use ordinary Markdown links such as `[label](https://example.com)` for external URLs.
Use `#` to reference a member of the current class, such as `[#clear()]`. Use `[clearing the entries][#clear()]` for a custom label in plain text, or a block tag such as `@see #clear()` for a related reference. Use ordinary Markdown links such as `[label](https://example.com)` for external URLs.

@modmuss50

Copy link
Copy Markdown
Member Author

Superseeded by: #7

@modmuss50 modmuss50 closed this Nov 6, 2026
@modmuss50
modmuss50 deleted the feature/conventions branch November 6, 2026 14:55
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