Skip to content

Javadocs for #604 #605

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

Merged
merged 23 commits into from
Aug 5, 2024
Merged

Javadocs for #604 #605

merged 23 commits into from
Aug 5, 2024

Conversation

binkley
Copy link
Owner

@binkley binkley commented Aug 5, 2024

This PR is for card #604.

Note the "To Decide" part of the card!
As the implementation on this branch stands now:

  • Gradle: Only generate Javadoc for "main" classes, and not unit or integration tests
  • Maven: Only generate Javadoc for "main" and "test" classes, and not integration tests

Perhaps these "To Decide" things should be moved to discussion in the wiki page.

References:

binkley added 23 commits July 27, 2024 10:05
This is a code example in tests of replacing the "system-lambda"
library specific to our needs of checking program output to the
terminal/console.

The `ContextForTerminal` test class is reusable, but unclear we should
provide this even as copy/paste for folks browsing our test code.

Along the way:
- Find that the PMD rule on "CommentSize" is awful. We should suppress
  it by default. When you write large comments (for example, in Javadoc)
  your build should not break.
- Suppressions of PMD checks, or rewriting for Checkstyle. This is a
  smell that either code is wonky, or this is too low-level to make a
  good example.
- Reminder that the old Java APIs only dealt with UTF issues in a
  half-ass fashion. A reason to use libraries that dealt with this for
  you.
- Reminder that terminal/console out/err is not thread-safe, and no
  library can fix that.
This is a code example in tests of replacing the "system-lambda"
library specific to our needs of checking program output to the
terminal/console.

The `ContextForTerminal` test class is reusable, but unclear we should
provide this even as copy/paste for folks browsing our test code.

Along the way:
- Find that the PMD rule on "CommentSize" is awful. We should suppress
  it by default. When you write large comments (for example, in Javadoc)
  your build should not break.
- Suppressions of PMD checks, or rewriting for Checkstyle. This is a              smell that either code is wonky, or this is too low-level to make a
  good example.
- Reminder that the old Java APIs only dealt with UTF issues in a
  half-ass fashion. A reason to use libraries that dealt with this for
  you.
- Reminder that terminal/console out/err is not thread-safe, and no
  library can fix that.
IntelliJ is happier with the line breaks in this commit.
Also, update the javadocs with better links and wording.
This does not yet generate javadocs in Maven, but sets up the basic
dependency for the Maven javadoc plugin so that CI dependabot will keep
us up to date.
This includes main code and test code, but not integration test code.
Find results in `target/site/apidocs` and `target/site/testapidocs`.
Making things public helps with Javadoc generation.
1. Generate local documentation under `target/site` for browsing.
2. Generate jars of main and test javadocs for sharing.
@binkley binkley requested a review from jwlibby August 5, 2024 13:35
@binkley binkley merged commit eaf00e5 into master Aug 5, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant