jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Refactor formatter cleanup classes

Open EricW123 opened this issue 1 month ago • 5 comments

Refactor Formatter and FieldFormatterCleanups in package org.jabref.logic.cleanup.

  • Move Formatter to logic.formatter package, as base class of other formatters.
  • Rename FieldFormatterCleanups to FieldFormatterCleanupActions.
  • Abstract parsing logic to a new class named FieldFormatterCleanupParser.

Closes #14280

Steps to test

Mandatory checks

  • [x] I own the copyright of the code submitted and I license it under the MIT license
  • [x] I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • [/] I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [x] I checked the user documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

EricW123 avatar Nov 10 '25 23:11 EricW123

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 // formatter:off and // formatter:on annotations to allow deviation from the code style.

jabref-machine avatar Nov 10 '25 23:11 jabref-machine

@EricW123 Thank you for your contribution. Please fix the the issues discovered by the CI so that the code is proapred for human review.

koppor avatar Nov 11 '25 10:11 koppor

@EricW123 I took the liberty to merge upstream and to fix merge conflicts. Should be easier to for you, if you want to pick this PR up again.

calixtus avatar Nov 23 '25 12:11 calixtus

@EricW123 Tests are still failing. Any interest to continue here or should we free this issue for another contributor?

koppor avatar Nov 29 '25 10:11 koppor

JUnit tests of jablib are failing. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Source Code Tests / Unit tests (pull_request)" and click on it.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

jabref-machine avatar Dec 02 '25 13:12 jabref-machine