bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
532 stars 305 forks source link

[ds] Place properties warning on class; extra warning for = #6277

Closed kriegfrj closed 2 months ago

kriegfrj commented 2 months ago

This PR:

  1. makes this warning appear on the source of the class itself to make it more noticeable, rather than on the bnd.bnd file;
  2. adds an extra hint if it sees that the filename contains an '=', asking "did you mean to use the "property" attribute?"; and
  3. replicates this functionality for the factoryProperties attribute.

Hopefully this will prevent my future self from wasting more precious brain cycles (which are in ever-increasingly shorter supply).

I did note that Bndtools only seems to display one warning per @Component tag (the last one that you specify). I'm not sure if this is Bndtools overwriting or if it is the Bnd reporter mechanism itself. I think it would be preferable if all warnings were displayed.

Fixes #6265

pkriens commented 2 months ago

lgtm, thanks