Skip to content
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

PropertiesParser: Warn on duplicate samefile properties #6501

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisrueger
Copy link
Contributor

@chrisrueger chrisrueger commented Mar 9, 2025

This is code extracted from #6493 and put into this new PR, because the other PR became to large. This mainly because of a misunderstanding of the problems to solve, which just became visible during discussion.

In this PR

This PR solves the problem that a developer might put a header two times inside the same .bnd file.
If it is a larger .bnd file it can be non-obvious to spot and lead to negative suprises. Thus some kind of warning should be displayed.

image

Pedantic or not

There has been some discussion to only log the warning when in pedantic=true mode.

One reason is that a duplicate header is technically totally legal in a java .properties file (which is what a .bnd file is).
But there is discussion whether this should be semantically allowed for .bnd files.

This is still to be decided and one reason for this extra PR.

within the same .bnd file
warn only when pedantic==true
includes testcase

Signed-off-by: Christoph Rueger <[email protected]>
@chrisrueger chrisrueger force-pushed the warn-on-duplicate-samefile-properties branch from 8c94c1f to ad94c49 Compare March 9, 2025 22:05
@chrisrueger chrisrueger marked this pull request as ready for review March 9, 2025 22:12
@chrisrueger
Copy link
Contributor Author

@kriegfrj @bjhargrave I have tried to incorporate the requested changes of the other PR and also log only when pedantic==true

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.

1 participant