-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add Mod Loader and MC Version changes to diff #48
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. I see very good things like: instead of using mutable collections, you are using map()
; also the printing and writing to file side effects are separate from the main function.
The resources for the tests should not be included like this. The best would be to generate them when the tests are set up and then clean them up afterwards. Also instead of using a Python script like this, it should be generated in the setup.
Feel free to ask if anything is not clear and good luck!
updatedProjects.forEach { terminal.info("! $it") } | ||
} | ||
|
||
private fun writeDiffChangesToFile( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function could be generalized to work for each type of change, if possible. Some patterns repeat, you could probably do it similarly to the above example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point, but the biggest problem I see here is that every time we write to a file, we check if there are more changes in the loaders or projects to insert the newline.
And since the different change types (MC version, loader, project) are looking for the next loader and project or just loader or just project, I don't see an easy way to do this.
# Minecraft
and# Loaders
to the diff outputheader-size
option to specify number of # in front of the headings