Skip to content

Issue #19827: Remove chapter numbers from Doc Comments Coverage Page#19828

Merged
romani merged 1 commit into
checkstyle:masterfrom
gianmarcoschifone:chapternum
May 21, 2026
Merged

Issue #19827: Remove chapter numbers from Doc Comments Coverage Page#19828
romani merged 1 commit into
checkstyle:masterfrom
gianmarcoschifone:chapternum

Conversation

@gianmarcoschifone

Copy link
Copy Markdown
Member

Issue #19827

  • Removed section numbers from displayed rule names in doc_comments_style.xml.
  • Excluded doc_comments from testAllStyleRules, since that validation depends on numbered rule names and anchors.
  • Added testDocCommentsStyleRules to validate doc-comments style coverage without relying on numbering.
  • Kept important checks for doc-comments modules, config links, sample links, duplicate modules, and sample folder existence.

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

GitHub, generate website

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like it

@Zopsss Zopsss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

one small change required:

}

private static void removeCommonUndocumentedModules(Set<String> styleChecks) {
// these modules aren't documented, but are added to the config

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

make this a javadoc comment

@Zopsss Zopsss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

few more changes:

Comment on lines -122 to +123
1.1.1.1 Separate Specification Documents
Java Platform API Specification is defined
by the documentation comments in the source code

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It was me , I asked to make all bold items to be links.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Resolved

Comment thread src/site/xdoc/doc_comments_style.xml Outdated
Comment on lines +256 to +259
2.1 Format of a Doc Comment
Format of a Doc Comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Make all following sub-sections of "Introuction" & "Writing doc comments" bold + italic:

Image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Making a some simple table of content will be awesome

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@gianmarcoschifone I think you misunderstood what I meant here. You made the sub-section bold + italic in the cached page but I meant to do it in the Coverage Table.

Comment on lines -268 to +271
2.1.1 Notes
Notes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

remove this, it is just notes

Comment on lines -280 to +283
2.1.2 getImage
getImage

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove this, it is an example not a rule/section:

Here is what the previous example would look like after running the Javadoc tool

Comment on lines -565 to +570
2.5.4.1 @author
@author

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

remove @author, @version, @param, @return, and all the other tags.

If we're not able to follow some tag then we will explicitly mention it in the coverage table with blue/red tick.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I asked to make them as link. As it looks like paragraph, and have wording on what is good .
Fact that we can not make any such words a rule, is our decision

@romani romani May 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As in Google style we slice and dice all text, and do not hesitate to mark section as "no rules".
It will be very clear for all that we read it attentively, and still think there is no rules.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

They were just tags, we don't have different checks for tags, mostly all of these tags will be using same check.

It'll make the table longer.

The google style guide on the other hand is very well documented and have numberings too. So skipping some rules/sections doesn't make sense, we should include all of them. But that is not the case with this documentation.

Anyways, let's keep this for now. If we're able to follow rules for all tags then I think we should remove it, otherwise we can keep it to inform user that a particular tag rule is not able to be followed by us.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

They were just tags, we don't have different checks for tags, mostly all of these tags will be using same check.

We do not know for sure, and you might noticed recent trend in Google style coverage that we create Google special Checks for very special requests. If general Check is not able to cover special request, we do special Check.

It'll make the table longer.

I am completely ok to rethink on this at the end of summer.
done: https://github.com/orgs/checkstyle/projects/19?pane=issue&itemId=190014508

@romani

romani commented May 19, 2026

Copy link
Copy Markdown
Member

@Zopsss , how can we make guide page to look good in mobile browser?

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

GitHub, generate website

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

Changed TOC style and added javadoc to the private method

@romani

romani commented May 19, 2026

Copy link
Copy Markdown
Member

@Zopsss

reasoning why we have links to all blocks of text in style guide:
Based on experience from Google style coverage, each sentence in guide may contains hint to rule that is wil lbe up to our interpretation to cover it or not. Wording sometime is more like recomentation not a rule.
If there is big block of text, a lot of sentences, it becomes hard to track that we read all , and there is definitely no rules in set of sentences.
Likely in Google style all is already in links and small chapters. It is not a case for Doc style, it is LESS structured.
So we need to slice and dice it to be always confident that we read all and non of them have rules. Users can come to us and ask why certain sentence is not a rule in Checkstyle, sliced and dices doc will help us to keep context on decision in separate issues, so it will easier to find our decision on each sentence.

@Zopsss

Zopsss commented May 19, 2026

Copy link
Copy Markdown
Member

Okay, let's keep the bullet points. And I've already replied regarding the tags documentation part.

@Zopsss

Zopsss commented May 19, 2026

Copy link
Copy Markdown
Member

how can we make guide page to look good in mobile browser?

Sorry I'm not able to understand, are you asking to improve the UI and Table design? this will include improving CSS, might also require JS too. Or just formatting of it? This will include only improving wording and HTML of the table.

@romani

romani commented May 19, 2026

Copy link
Copy Markdown
Member

https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/0eb9c0b_20260519084502/styleguides/doc-comments-style/doc-comments-styleguide.html

Text is not wrapped in good way on mobile phone. Font is too little, it required to zoom in and scroll horizontala few times to finish reading.

Screenshot_20260519-084112

It would help me alot if it looks like
Screenshot_20260519-084222
When phone browser is used.

But this can be done is separate issue, not a blocker here

@romani

romani commented May 19, 2026

Copy link
Copy Markdown
Member

@Zopsss , I a little not sure on review status from you. Are you ok to merge or some items should be done?

@Zopsss

Zopsss commented May 20, 2026

Copy link
Copy Markdown
Member

https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/0eb9c0b_20260519084502/styleguides/doc-comments-style/doc-comments-styleguide.html

Text is not wrapped in good way on mobile phone. Font is too little, it required to zoom in and scroll horizontala few times to finish reading.

This can be fixed via CSS. We can tackle this in different issue. @gianmarcoschifone please open an issue regarding this.

Zopsss

This comment was marked as off-topic.

@Zopsss

Zopsss commented May 20, 2026

Copy link
Copy Markdown
Member

I a little not sure on review status from you. Are you ok to merge or some items should be done?

Last change is required: #19828 (comment)

@romani

romani commented May 20, 2026

Copy link
Copy Markdown
Member

@gianmarcoschifone , please do this last point.
We are very close to merge.

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

GitHub, generate website

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

@Zopsss @romani done

@Zopsss Zopsss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. It's a very good start for our project!! @gianmarcoschifone

@romani romani merged commit 3056d95 into checkstyle:master May 21, 2026
128 checks passed
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