Skip to content

Conversation

timurturbil
Copy link
Contributor

@timurturbil timurturbil commented Aug 14, 2025

Closes #13318

I've updated the BibtexLogParser class by adding a new BIBLATEXT_WARNING_PATTERN to specifically recognize and parse Biber's data model validation warnings. Concurrently, a new @ParameterizedTest was implemented in BibtexLogParserTest to thoroughly test this new pattern, ensuring the parser correctly extracts information from these distinct warning messages. This enables JabRef to now support a wider range of Biber's log outputs.

Steps to test

You can test the business by just running parsesBiblaTexValidationWarnings test in BibtexLogParserTest.
In other way, you can also see validation messages in Check Integrity in JabRef.

The warnings in the screenshot has been catched by the new pattern.

image

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked 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 to the documentation repository.

if (message.startsWith(EMPTY_FIELD_PREFIX)) {
fieldName = message.substring(EMPTY_FIELD_PREFIX.length()).trim();
fieldName = FieldFactory.parseField(fieldName).getName();
// For BiblaTex warnings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment adds no value as it merely restates what is obvious from the code. Should be removed or enhanced with additional context.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not camel case latex or bibtex or biblatex in variable names.

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scrolled through. On the road, therefore only quick comment

Would be nice if you changed JavaDoc comments to markdown style. That is more maintainable. (/// And markdown instead of /*)

…tex and bibtex in variable names instead of camel case.
@timurturbil timurturbil requested a review from koppor August 18, 2025 09:40
@jabref-machine
Copy link
Collaborator

Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of [x] (done), [ ] (not done yet) or [/] (not applicable).

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good - let's see, how it behaves in practise.

I go ahead with merging.

Comment on lines 52 to 56
/// **Parameters:**
/// * `line` - The single line from the .blg file to parse.
///
/// **Returns:**
/// * An `Optional` containing a `BibWarning` if a match is found, or an empty `Optional` otherwise.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use JavaDoc format - see deleted code for the format to be used.

I fixed in 7ee3497.

Copy link

trag-bot bot commented Aug 28, 2025

@trag-bot didn't find any issues in the code! ✅✨

@koppor koppor enabled auto-merge August 28, 2025 12:31
@koppor koppor added this pull request to the merge queue Aug 28, 2025
Merged via the queue into JabRef:main with commit 0f926c6 Aug 28, 2025
44 of 45 checks passed
Siedlerchr added a commit that referenced this pull request Aug 28, 2025
…n-c23b1a88-5c29-46a2-a007-701edd344b9b' into jetbrains-junie-issue-13623-run-c23b1a88-5c29-46a2-a007-701edd344b9b

* upstream/jetbrains-junie-issue-13623-run-c23b1a88-5c29-46a2-a007-701edd344b9b:
  Streamline code for getTabTitle() (#13781)
  Add missing variables
  Reformat BibTex in Show BibTex Source (#13761)
  Auto publish before JBang tests (#13779)
  Hotfix: calling of publish.yml
  Support BibLaTeX datamodel validations (#13693)
  Auto add and remove of "status: changes-required" label (#13778)
  New Crowdin updates (#13777)
  Restore local-only Git behavior for SLR to fix repository initialization error (#13775)
  Use vanilla hashset (#13771)
  Fix Springer Fetcher names (#13770)
  Fix condition
  Publish SNAPSHOT on jablib change (#13774)
  Adapt as per new set of checks (#13772)
  Bump jablib/src/main/resources/csl-styles from `1194364` to `17cfa60` (#13750)
  Fix path (#13769)
  Mode aware consistency check (#13584)
  Refine JBang check (#13765)
  Add Language Server to the UI and add the integrity/consistency check (#13697)
  Fix/remove comment code (#13763)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support datamodel validations
3 participants