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

Consistent Javadocs Tags Order #2

Draft
wants to merge 10 commits into
base: 3.x
Choose a base branch
from

Conversation

PhilipIngham
Copy link

@PhilipIngham PhilipIngham commented Jul 25, 2024

Check List:

Following the contributing guidelines will make it easier for us to review and accept your PR.

@PhilipIngham
Copy link
Author

PhilipIngham commented Jul 25, 2024

Started working on this issue, definitely going to take a while to change everything, and then implement a way for it to be kept up with automatically. Here is a checklist that I will edit and update with the changes that need to be made and completion status:

Reordering all tags to be in the correct order, following the Javadoc order of tags:
@author - Complete!
@version - Already done.
@param - Complete!
@return - Complete!
@exception (covers @throws) - Complete!
@see - Complete!
@since - Complete!
@serial - Complete!
@deprecated - Complete!

Reorder multiple @throws tags to be in alphabetical order as per the Javadoc order of multiple tags (open to discussion)

Create a method to enforce this ordering of tags automatically

@PhilipIngham
Copy link
Author

With the above commit, someone can now check for issues in ordering of tags with mvn checkstyle:check.
Currently still working on automation though I think I am close to getting it working

@scordio
Copy link

scordio commented Aug 17, 2024

@PhilipIngham by luck, I noticed you opened the PR on a fork and not on assertj/assertj 😉

@PhilipIngham
Copy link
Author

Yeah this is so people can review internally before making a pull request against the actual repository

@PhilipIngham
Copy link
Author

I've ran into a spot of trouble with this. Essentially, the last commit I did should allow so that whenever a maven build is ran, it should do the checkstyle check I have created using my ruleset, however I can't get it to run. I've tried using different phases in the plugin in the pom.xml file (such as verify and compile) but nothing changes. I feel like I'm missing something pretty obvious with it, would someone be able to have a look?

@scordio
Copy link

scordio commented Aug 22, 2024

If no one finds a solution earlier, I try playing with it over the weekend.

@PhilipIngham
Copy link
Author

That would be great, thanks :)

@scordio
Copy link

scordio commented Aug 25, 2024

Raised #3 against this branch.

Move `maven-checkstyle-plugin` execution to `plugins` section
@PhilipIngham
Copy link
Author

Just an FYI I am still working on this 😅 Just been away for a week so not done much during that time. Current focus is getting the throws tags to be ordered alphabetically, then I'll be looking to merge it in :)

@scordio
Copy link

scordio commented Sep 10, 2024

Take your time and thank you very much for your effort!

@PhilipIngham
Copy link
Author

Hey, just thought I'd give an update on this and how it is going.

As of now I'm at the point where I'm trying to sort the throw tags to be alphabetically ordered. This is proving to be a very difficult task, as there is nothing available in the checkstyle plugin to help with this, so I've been trying to write some stuff myself but it's seeming to be probably a lot more hassle than it's worth.

With myself, I'll be moving onto different things so the likelihood of me working on this for too much longer aren't that high. I'll still be able to do bits here and there, but it won't have my full attention.

What I suggest is either:

  • This be merged in by itself as the ordering of all javadoc tags is successful
  • Or this be put on hold for someone else to pick up

Happy with whichever option is chose.

@scordio
Copy link

scordio commented Sep 28, 2024

Would you have time to raise the PR against the main repo, even as a draft?

I'm happy to take over the topic and finalize it, but most likely not in the short term. I'll get there eventually 🙂 and keep you as the author.

@PhilipIngham
Copy link
Author

Created one here: assertj#3627

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.

Missing consistent order of Javadoc tags
2 participants