-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactoring to add lint levels on queries #787
refactoring to add lint levels on queries #787
Conversation
* split part of `check_release::run_check_release` into a helper function `print_lint_error` * add `LintLevel` struct in `query` and add it as a field to `SemverQuery` * add default `Deny` field to all existing lints in `lints/` * add `shell_error` function in `GlobalConfig
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.
Reverting my suggestions and merging as it was before. There's still a bit of an API design issue around how we do printing, but we can resolve it in the future -- it doesn't have to block us right now.
From a PR mechanics perspective, I'd recommend using even smaller PRs to make them even easier to merge. This PR does three unrelated things, as you noted by writing its summary as a bulleted list:
None of these three things needed to be in the same PR as the rest, and a 10-line PR is a lot easier to review and merge compared to a 100-line one. So don't worry about opening lots of PRs concurrently for orthogonal functionality. It's fine even if the PRs are tiny — we'll both move much faster that way. |
Got it, thanks so much for the feedback! |
On that note, how would you recommend writing the PRs to add the override data structures? Before, there were three: one instance of an override (called |
All three of those seem quite related to each other, so it's probably okay to put them in the same PR if you can't figure out a good way to split them into completely orthogonal changes that can stand independently. Not every PR has to be tiny, but the more you're able to find ways to make them small and self-contained, the faster our velocity and higher our code quality will generally be. This is a skill that one can practice just like any other. I'd recommend this:
You're a good engineer, and if you use the same GitHub PR review UI I use, I bet you'll notice 99.9% of the things I'd flag in my review. But it's very important to do the self-review in the GitHub UI, not in your editor. Our brains have a weird tendency to miss details if they are in an environment they are very used to (like if you've been coding a new feature for a few hours), and the shakeup of looking at the code in a new environment will let you see things you otherwise would have missed. |
check_release::run_check_release
into a helper functionprint_lint_error
LintLevel
struct inquery
and add it as a field toSemverQuery
Deny
field to all existing lints inlints/
shell_error
function inGlobalConfig