-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add WrongEscapeChecker for detecting invalid escape sequences in journal abbreviations #14736
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
base: main
Are you sure you want to change the base?
Conversation
|
Hey @khushikushwah! 👋 Thank you for contributing to JabRef! We have automated checks in place, based on which you will soon get feedback if any of them are failing. We also use Qodo for review assistance. It will update your pull request description with a review help and offer suggestions to improve the pull request. After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs. You can read about the whole pull request process in our contribution guide. Please ensure that your pull request is in line with our AI Usage Policy and make necessary disclosures. |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
koppor
left a comment
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.
Seems to be a draft PR
| this(name, | ||
| abbreviation, | ||
| // "L. N." becomes "L N ", we need to remove the double spaces inbetween | ||
| // "L. N." becomes "L N ", we need to remove the double spaces in between |
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 the code is not necessary any more if the comment is changed?
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.
can you please tell me what I should do next with this code. Do I need to redo it.
| requires kotlin.stdlib; | ||
| requires mslinks; | ||
| requires org.antlr.antlr4.runtime; | ||
| requires org.jooq.jool; | ||
| requires org.libreoffice.uno; | ||
| requires transitive org.jspecify; | ||
| requires org.junit.jupiter.api; | ||
| requires kotlin.stdlib; |
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.
Why? Which AI did you use?
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.
It's my first time to contribute to the open-source projects, as a beginner I used to learn how I work on this. I used Microsoft copilot to assist me to writing the code and commit messages
|
|
||
| @BeforeEach | ||
| void setUp() { | ||
| void setUp() { |
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.
?
| @Test | ||
| void getName() { | ||
| } | ||
|
|
||
| @Test | ||
| void getAbbreviation() { | ||
| } | ||
|
|
||
| @Test | ||
| void getShortestUniqueAbbreviation() { | ||
| } | ||
|
|
||
| @Test | ||
| void isDefaultShortestUniqueAbbreviation() { | ||
| } | ||
|
|
||
| @Test | ||
| void getDotlessAbbreviation() { | ||
| } | ||
|
|
||
| @Test | ||
| void compareTo() { | ||
| } | ||
|
|
||
| @Test | ||
| void getNext() { | ||
| } | ||
|
|
||
| @Test | ||
| void testToString() { | ||
| } | ||
|
|
||
| @Test | ||
| void testEquals() { | ||
| } | ||
|
|
||
| @Test | ||
| void testHashCode() { | ||
| } |
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.
Unfinished?
|
@khushikushwah UI? Maybe guide your AI more. Thank you. |
- Implemented WrongEscapeChecker to flag suspicious backslashes in journal names/abbreviations - Added WrongEscapeCheckerTest to verify detection logic - Introduced supporting classes: AbbreviationEntry, Checker, Finding, Severity - Integrated checker into quality checking framework
dcad84c to
721fc78
Compare
|
I reformate the code. but it still shown some error. how I solve these errors please tell me. |
- Implemented WrongEscapeChecker to flag suspicious backslashes in journal names/abbreviations - Added WrongEscapeCheckerTest to verify detection logic - Introduced supporting classes: AbbreviationEntry, Checker, Finding, Severity - Integrated checker into quality checking framework
|
Your code currently does not meet JabRef's code guidelines. IntelliJ auto format covers some cases. There seem to be issues with your code style and autoformat configuration. Please reformat your code (Ctrl+Alt+L) and commit, then push. In special cases, consider using |
Closes #149
This PR introduces a new quality checker,
WrongEscapeChecker, to detect suspicious escape sequences in journal full names and abbreviations.The checker flags any backslash (
\) that may indicate invalid formatting and reports findings withSeverity.ERRORand codeERR_WRONG_ESCAPE. A corresponding unit testWrongEscapeCheckerTestverifies the detection logic. This helps maintain clean abbreviation data and improves quality control.Steps to test
WrongEscapeCheckerTestin the test suite.ERRORand codeERR_WRONG_ESCAPE.✅ Example test result screenshot:


Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)