abbrv.jabref.org
abbrv.jabref.org copied to clipboard
Add GitHub quality check action: The starting letters should match
The action should check:
- [x] Each abbreviation should not contain
\&(refs https://github.com/JabRef/abbrv.jabref.org/pull/100#issuecomment-1173865776) - [ ] The starting letters should match somehow (refs https://github.com/JabRef/abbrv.jabref.org/issues/105
- [ ] https://github.com/JabRef/abbrv.jabref.org/issues/125
Hi, its me again,
I've added a basic python script in my fork which runs every time the main branch is pushed to, and checks if any ampersands are escaped. I have done this using GitHub actions as suggested.
The current result of this follows;

(Noting the error was not added by me, seems like we do in fact have an escaped ampersand in the repo)
My question is, what else needs to be done? Do we want the csv to be automatically edited in this case to replace the \& with &? Would it be more helpful if I add the specific line and column of the escaped ampersand to the error?
Thanks for your patience in advance :)
Thanks for your script, I would say column and line number reporting is the best way to go forward. Followed by a manual editing then Automatic fixing could have some side effects.
Hi, I've updated the script so that now, it returns all the locations of all escaped ampersands, instead of just failing on the first one found. This has been tested locally with multiple escaped ampersands across multiple files.
I have also amended the erroneous csv file. Aside from the small formatting error, I was wondering if this was ready for a code review/draft pull request. I have currently worked on my main branch so as to simulate how GitHub actions will execute the script in actuality, but I can transfer this over to a feature branch if needed.
Any other feedback is also appreciated, thanks!
@AkshatJain9 you implemented "Each abbreviation should not contain &"
The check for "the starting letters should match somehow" is still missing. I don't know, how easy this is.