eclipse-cs icon indicating copy to clipboard operation
eclipse-cs copied to clipboard

New metadata maintanence method: Fetch directly from checkstyle

Open gaurabdg opened this issue 5 years ago • 5 comments

gaurabdg avatar Aug 27 '20 21:08 gaurabdg

@romani @gaurabdg Is there a reason this issue is till open?

rnveach avatar Aug 29 '21 17:08 rnveach

@romani If we have integration with checkstyle from metadata, doesn't this mean tests and internal XML files that duplicate checkstyle can be removed? IE this class: https://github.com/checkstyle/eclipse-cs/blob/103c8195153fb105540d5d92d6cfcc58d6bbd5b0/net.sf.eclipsecs.checkstyle/test/net/sf/eclipsecs/checkstyle/ChecksTest.java And these resources: https://github.com/checkstyle/eclipse-cs/tree/103c8195153fb105540d5d92d6cfcc58d6bbd5b0/net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle

How do we know we are using the new way and not still hooking in to the old way with it here?

Full integration means we should be relying on checkstyle for this information, and not maintaining/duplicating anything of our own.

rnveach avatar Aug 29 '21 17:08 rnveach

Is there documentation on the required format of the YML files eclipse-cs is looking for it's integration? Like is it required every check be listed in it? Every package? Or is it just the base and reflection is used to find the rest inside it?

I am trying to understand things to see why sevntu is broken and it has a YML file that I assume may be overriding the "old" way, but I don't know how these things hook together.

Sevntu: https://github.com/sevntu-checkstyle/sevntu.checkstyle/blob/master/eclipsecs-sevntu-plugin/src/com/github/sevntu/eclipse-metadata.yml

Eclipse-CS: https://github.com/checkstyle/eclipse-cs/blob/5b295acc79fd1bc37e38d9a2f06c01667c57ed29/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/config/meta/MetadataFactory.java#L161-L172

rnveach avatar Aug 29 '21 17:08 rnveach

We load new metadata, and if there is problem, load old config.

No documentation. All Checks has to have metadata. Files contain information that reflection can not reliability take. Sevntu does not have new metadata files for Checks. It is not merged PR

romani avatar Aug 29 '21 19:08 romani

I am marking the final leg of this issue as blocked as discussed in https://github.com/checkstyle/checkstyle/issues/10773 . Completion of this issue is all metadata (checkstyle_metadata.*) stored in eclipse-cs be removed.

I don't see it viable to remove the issue packages from checkstyle_packages.xml as they are valid and I don't have the expertise in this project to say what the ramifications would be for they to be gone. I can only assume we may fail to find the classes in the package.

rnveach avatar Sep 02 '21 01:09 rnveach