-
Notifications
You must be signed in to change notification settings - Fork 14
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
Enforce the Attribute suffix in AttributeName #42
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.
Looking good, can you update the CHANGELOG
?
Just the rule improvement, no need to list the metadata changes in the second commit.
Are we updating the CHANGELOG in PRs? I haven't done that in any of my other PRs. I understand how this could be useful, ensuring that the CHANGELOG is up to date, but it also has downsides - in particular, requiring PRs to update the CHANGELOG has the disadvantage of causing regular merge conflicts when accepting pull requests. If we are going to enforce updating it in the PR, then I should also update the contribution guidelines in #49. |
No strict decision on that one yet, you're right that it would be an area rife with merge conflicts. Thoughts? @zaneduffield @fourls |
I think it would be a good idea to forbid updating the changelog in PRs, just because of the potential friction to the PR workflow. The only problems are
We can edit the CHANGELOG through the GitHub UI, so hopefully (2) shouldn't cause too much friction for the merger. Could it be possible to have some sort of automated process for updating the changelog? Off the top of my head, I'm not sure exactly what that would look like. |
I was thinking that the PR reviewer would rebase and force-push the changelog update to the PR branch before merging.
Automation on this sounds like a bit of a pain, I wouldn't bother. |
This is a pretty common problem in active projects. Some solutions include
|
If the reviewer will have to manually rebase the changelog update anyway, you might as well just enforce updating the changelog in the PR.
This seems like a good solution for big projects, but probably overkill for SonarDelphi.
This would be perfect! Annoying that GitHub doesn't support this natively, looks like it doesn't read .gitattributes at all. |
We also won't necessarily have permissions to change the PR branch.
I think the best solution overall would probably be to have Personally, I think it would also work well enough (and be less messy) if we didn't enforce anything on PR and just periodically updated the changelog, but I can understand why we might not want to do that. |
I think at the very least the future changelog entries should be written in advance. I don't really care whether it is stored in the commit message, in a PR comment, or inside the repository. |
The more I think about it, the more I think this will be the easiest workflow:
The main reasons I have for this are:
|
Yep, this reasoning is pretty compelling to me. |
Sounds good! Is this PR okay to be merged? |
1e0c2cc
to
fd6241c
Compare
fd6241c
to
6b2b1d2
Compare
The AttributeName rule currently allows you to configure whether the "Attribute" suffix is required, optional, or forbidden. This is unnecessarily flexible as there is no good reason not to use the suffix - and makes it difficult to write a rule description for as it can be all things to all people. Attributes should be named with the Attribute suffix because
This PR removes this configuration from AttributeName, instead always requiring the "Attribute" suffix.