Let consistency checker yield a return code#13329
Merged
koppor merged 3 commits intoJabRef:mainfrom Jun 15, 2025
stephanlukasczyk:13328-consistency-checker-return-code
Merged
Let consistency checker yield a return code#13329koppor merged 3 commits intoJabRef:mainfrom stephanlukasczyk:13328-consistency-checker-return-code
koppor merged 3 commits intoJabRef:mainfrom
stephanlukasczyk:13328-consistency-checker-return-code
Conversation
koppor
requested changes
Jun 15, 2025
Member
koppor
left a comment
There was a problem hiding this comment.
Thank you for taking up on the issue.
In general, I like it.
Two things: Just remove the failOnError and use the exit code "structure" from https://github.com/DavidAnson/markdownlint-cli2#exit-codes - meaning: 1 for linting issue and > 1 for all other errors. 😅
As suggested by @koppor it makes totally sense to always exit with a non-zero exit code in case of issues. Exit code 0 means no issues in linting, exit code 1 means linting issues, exit code 2 means any other issues. Also remove the CLI flag to enable/disable the feature.
|
@trag-bot didn't find any issues in the code! ✅✨ |
koppor
approved these changes
Jun 15, 2025
Siedlerchr
added a commit
to FlyJoanne/jabref
that referenced
this pull request
Jun 15, 2025
* upstream/main: New Crowdin updates (JabRef#13330) Add arm 64 linux runner (JabRef#13258) Rename strings and variables in New Entry (JabRef#13312) Let consistency checker yield a return code (JabRef#13329) Update LETTER fragment to resolve Windows parsing issue (JabRef#13327) Add support for "dev: no-bot-comments" Update dependency org.hibernate.validator:hibernate-validator to v9.0.1.Final (JabRef#13322) Endnote XML Exporter: Move factory initialization to constructor (JabRef#13321) Refine assignment reminder (JabRef#13315) Add welcome message to first time contributors (JabRef#13314) New Crowdin updates (JabRef#13311) Added a setting to show File annotations' tab only when the PDF actually contains highlights or comments (JabRef#13279) Update dependency org.postgresql:postgresql to v42.7.7 (JabRef#13306) Refine PULL_REQUEST_TEMPLATE.md (JabRef#13304) Move module tweaking of merged module to launcher (JabRef#13303) Speed up gradle update (JabRef#13300) testImplementation is enough (JabRef#13299)
Siedlerchr
added a commit
to JustinHennis1/jabref
that referenced
this pull request
Jun 16, 2025
* upstream/main: New Crowdin updates (JabRef#13330) Add arm 64 linux runner (JabRef#13258) Rename strings and variables in New Entry (JabRef#13312) Let consistency checker yield a return code (JabRef#13329) Update LETTER fragment to resolve Windows parsing issue (JabRef#13327) Add support for "dev: no-bot-comments" Update dependency org.hibernate.validator:hibernate-validator to v9.0.1.Final (JabRef#13322) Endnote XML Exporter: Move factory initialization to constructor (JabRef#13321) Refine assignment reminder (JabRef#13315) Add welcome message to first time contributors (JabRef#13314)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13328
A rough sketch of my idea how the consistency checker could yield a return code in cases where it did not find some inconsistencies. This can be especially useful, when the checker is used in scripts or CI, where it could mark the stage as failing due to the non-zero return code.
@Siedlerchr @koppor This is a probably very hacky way of doing it, to sketch the idea. I'd like to know your feedback about it, though.
Steps to test
Run the jabkit CLI with argument
check-consistency --input /path/to/erronueous.bibMandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)