-
Notifications
You must be signed in to change notification settings - Fork 1
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
New pre commit check for release note bullet point format #10
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.
So far I have just done a code review. I have two minor suggestions
for filename in filenames: | ||
with open(filename, 'r') as rn: | ||
lines = rn.readlines() | ||
for i in range(len(lines)): |
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.
Is it possible to avoid using a range-based for loop by just iterating through each element in the list?
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 think I wanted the index so I could change the value in the list on line 32.
Signed-off-by: mantid-builder <mantid-builder@hosting.com>
Signed-off-by: mantid-builder <mantid-builder@hosting.com>
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.
The changes look good and have already been tested from @jhaigh0 's repo. Out of interest, what are the windows and darwin clang executables for?
Those commits were added by the pre commit checks which ran. |
Required for mantidproject/mantid#36202
When mantid combines release notes into larger grouped files, if release notes have mismatched bullet point styles (
-
vs*
for example) when sphinx will give a warning and the docs build will fail. Officially Mantid standards say all release note should use a-
so this pre commit hook will enforce that.I've added some unit tests to go along side any manual testing.
This is all pretty much lifted from the repo I made here thinking that we didn't have one already...