-
Notifications
You must be signed in to change notification settings - Fork 223
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
[doc] Rex::Commands::File: correct optional argument syntax #1530
Conversation
commitlint failing with ISE 500 |
Hmm, the two jobs failed for external reasons, so now I've re-run them. Only the commit check fails now, and I'll come back for a review as soon as that passes too. Let me know if you need help with that earlier, though. Feel free to join the chat on Matrix or IRC too, it might be easier to coordinate there when we're both online. |
Could you shrink my commit message from 78 to 50? I'll also join Matrix after registration. Thanks. |
Sure, how about going with
Meanwhile, a new version of Perl::Tidy has been released so I updated the test suite and the codebase formatting on the default branch already. Please also rebase your changes on top of the default branch in order to test them against the current state. After this PR passes all tests, I'll do a full review. |
I'm not very git/GitHub-savvy though will try my best to rebase and amend if possible considering your last comment 🙂 |
Whatever, giving up on this PR 😞 I git with Intellij IDEA and rebase/amend/squash breaks everything everytime for me. Feels too dangerous for simple edits. This are just too complex for simple things, easy things should be easy right? I also feel like enforcing commitlint is also not the best for "layman" contributors like myself (maybe it'd be good for developers for internal standartization) 🙂 Or commits could be edited by maintainers manually, isn't ticking Anyways this just prevents simple contribution (second PR failing). |
TL; DRDon't feel discouraged if it didn't succeed at first try. The tests are there to help avoid common mistakes, and it's fairly standard to have multiple versions of the same idea before something is merged. I see at least these options to go forward:
They are not excluding each other, and none of them are mandatory. Long version
I'm sad to hear that. I don't think it's lost, though.
"Simple" and "easy" does not mean the same for everybody or for all tools. Take your time to figure it out, and ask for help if stuck. I don't have experience with IntelliJ IDEA. Standard I'm usually available on Matrix for more interactive help, and also offer open source office hours free of charge if you prefer to work in pair in a planned manner.
Thanks for the feedback on that. The Contributing guide explains the established expectations and practices around contributions. This includes Git workflow and how to write a git commit message (which article also explains why good commit messages matter).
That's an option, yes. I don't change other's commits before merging to preserve the work of the original author intact. Technically, however, I can try to rebase this branch for you (GitHub allows editing fork branches on PRs), and I can also rebase it on my own before merging. We may be able to aim for one of these options here.
The current codebase is a result of 100+ volunteers' collective work over more than a decade. To avoid chaos and keep it sustainable, there are some standards in place based on what we learned over time. These expectations are explained in the Contributing guide and tested automatically to provide fast feedback even if a reviewer or maintainer is not available immediately. All contributions are measured against the same standards to ensure and maintain consistency. The "rules" are part of the repository, so these are also up to discussions (separately from this PR) and can be subject to contributions.
Oh, I don't consider the previous PR a failure at all! ❤️ It enabled us to identify important points about how to improve documentation content and consistency, and also to expand the scope of automated feedback. From my perspective, that was a PR without an issue where we could have discussed details before work is invested. While working on that we discovered a broader scope than we originally expected. Instead of iterating on the same PR until it is good enough to merge, there was a decision to open a new PR instead. |
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 coming back to this PR, and I'm glad you could update it! 🎉 ❤️
It took me a while to go through all cases in Rex::Commands::File, but in the end I find the proposed changes correct in the scope of the "mark optional parameters optional" idea, and consistent with the current state of the rest of the file.
I left a note about one of the changes mostly for future reference for future maintainers who might read this PR. No action needed about that.
I found two more cases to add on top of the existing ones, though:
- the
%options
offile()
is also optional, so let's mark that similarly too - the
@params
oftemplate()
is also optional: it takes either a%params
(named parameters) or\%params
(named parameters in a hash reference)
I'm not sure how it's best to mark the second one. I'm leaning towards choosing the preferred/recommended notation, which is %params
to reduce punctuation around what is being passed. I'm open to better alternatives if there is an even better proposal.
Please update the PR by including those two as well, and choose the way you are comfortable with:
- The easiest way is probably to amend the commit like last time, and push again.
- If you want, you can push it as a new commit, and we can squash the two commits into one before merging. This might be useful for practice, but sounds more work overall :)
- Alternatively, if you don't want to update the PR, that's fine too. I can add the above as a second commit on my own before merging, just let me know that I should not wait for the update.
yeah, I also thought that file and template can be optional, but couldn't imagine any to be useful without parameters.
I chose this option for practice, please tell me when and how we can do it |
The parameter itself is still optional whether there's a point to use it like that or not :) Some examples for them without using optional parameters, though:
Good news is that "squashing" is also done with the already used What I would specifically do here is the following:
|
232076b
to
f899707
Compare
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.
changes addressed
Clarify commands docs taking optional arguments such as append_if_no_such_file
I hope I did all the changes except creating an issue first which I promise to do the next time :-)
#1526
Checklist