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

Metadata Integration #242

Merged
merged 1 commit into from
Aug 20, 2020
Merged

Metadata Integration #242

merged 1 commit into from
Aug 20, 2020

Conversation

gaurabdg
Copy link
Contributor

@gaurabdg gaurabdg commented Jul 20, 2020

Draft PR to track progress

PoC

As you can see module description, tokens/enum values are all working perfectly after making the commit changes.

Before:
Screenshot_20200724_035832
After:
Screenshot_20200724_035725

Overall working of the plugin

Before:
Screenshot_20200727_102355

After:
Screenshot_20200727_102326

Working of createMeta() - Modules which are not present in the eclipse-cs metafiles, are directly fetched from checkstyle, hence proving that we dont need to update the files manually(as has been done in #245).

Here, the eclipse-cs meta files are the master ones, but the checkstyle JAR versionin this PR is 8.35, where a new check PatternVariableName was introduced. You can see that it is reflecting properly.

Screenshot_20200807_175415

SevNTU is working as before, not being affected by these changes

Screenshot_20200808_133810

Updated metadata is also showing up for those checks having checkstylemeta-.* file name in the sevntu repo(PR: sevntu-checkstyle/sevntu.checkstyle#821). Hence proving third party module integration

Screenshot_20200810_141325

Custom config having only Empty Public Ctor in Class Check

Screenshot_20200807_221900

@gaurabdg gaurabdg force-pushed the meta-integration branch 4 times, most recently from 276d567 to 61ab410 Compare July 23, 2020 13:42
@romani
Copy link
Member

romani commented Jul 23, 2020

@gaurabdg , same as in sonar plugin, please provide prove (screenshots) that new file is taken in priority over existed config.
and that Check is actually can be saved in UI and working :).
Please confirm that SEVNTU extension project is working also as before - no breaking changes.

@romani romani requested review from Calixte and lkoe July 23, 2020 14:44
@romani
Copy link
Member

romani commented Jul 23, 2020

@Calixte or @lkoe , please review code update for POC of new metadata files and their support in plugin.
reminder: such files will be located in checkstyle.jar.

@romani
Copy link
Member

romani commented Jul 23, 2020

@gaurabdg , please add one more metafile with Tokens, we need few very different and representative files in this PR.

@gaurabdg
Copy link
Contributor Author

@gaurabdg , please add one more metafile with Tokens, we need few very different and representative files in this PR.

@romani Please check description, I have provided all proofs and verification screenshots, please let me know if something else is needed.

@romani
Copy link
Member

romani commented Jul 26, 2020

@gaurabdg , make it regular PR.
Let's prepare for merge.

Please confirm that SEVNTU extension

I do not see screenshots for this.

Please also show that configured Checks are running fine.

@gaurabdg gaurabdg marked this pull request as ready for review July 26, 2020 18:54
@gaurabdg gaurabdg force-pushed the meta-integration branch 2 times, most recently from 416a11f to ff6f1a0 Compare July 27, 2020 14:10
@@ -12,6 +12,12 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<accessrules>
Copy link
Contributor

@Calixte Calixte Jul 27, 2020

Choose a reason for hiding this comment

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

What is this change for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My IDE build failed for these cases, thats why I had to add them

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

test of sevntu is must do.
we have to make sure that we are backward compatible.

@gaurabdg
Copy link
Contributor Author

gaurabdg commented Aug 7, 2020

test of sevntu is must do.
we have to make sure that we are backward compatible.

Please check description, I have provided screenshots.
Also I have provided screenshots for createMeta functionality

@romani
Copy link
Member

romani commented Aug 7, 2020

@gaurabdg , please move all updates for version bump to separate commit (first commit)
Ones #245 is merged it will not be required.

@Calixte , please provide review.

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

https://user-images.githubusercontent.com/23253816/89645628-ce5d2300-d8d7-11ea-9bc0-1ba6b9e3913e.png - does not prove that sentu works, please share that metadata is loaded for any Check and and you can configure it in UI and it executes.

items:

net.sf.eclipsecs.core/build.properties Outdated Show resolved Hide resolved
@gaurabdg
Copy link
Contributor Author

gaurabdg commented Aug 7, 2020

https://user-images.githubusercontent.com/23253816/89645628-ce5d2300-d8d7-11ea-9bc0-1ba6b9e3913e.png - does not prove that sentu works, please share that metadata is loaded for any Check and and you can configure it in UI and it executes.

Done

@gaurabdg gaurabdg requested a review from romani August 14, 2020 12:17
gaurabdg added a commit to gaurabdg/eclipse-cs that referenced this pull request Aug 14, 2020
Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

items:

gaurabdg added a commit to gaurabdg/eclipse-cs that referenced this pull request Aug 15, 2020
Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

Please remove from commit net.sf.eclipsecs.core/lib/metadata-gen-1.0-SNAPSHOT.jar please make sure you never have it.

Item:

gaurabdg added a commit to gaurabdg/eclipse-cs that referenced this pull request Aug 16, 2020
@gaurabdg gaurabdg requested a review from romani August 16, 2020 15:03
Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

items:

gaurabdg added a commit to gaurabdg/eclipse-cs that referenced this pull request Aug 16, 2020
@gaurabdg gaurabdg requested a review from romani August 17, 2020 07:06
Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

one item in not resolved from top.

few more minors:

gaurabdg added a commit to gaurabdg/eclipse-cs that referenced this pull request Aug 18, 2020
Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

Items'

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

@Calixte , please finalize review.

@romani romani removed the request for review from lkoe August 20, 2020 05:50
@romani romani merged commit a21ba17 into checkstyle:master Aug 20, 2020
@Calixte
Copy link
Contributor

Calixte commented Aug 25, 2020

The plugin is broken since this PR. Adding checks through the UI doesn't work anymore.

ModuleDetails moduleDetails) {
RuleMetadata modifiedRuleMetadata = new RuleMetadata(
ruleMetadata.getRuleName(), moduleDetails.getFullQualifiedName(),
moduleDetails.getParent(), ruleMetadata.getDefaultSeverityLevel(),
Copy link
Contributor

Choose a reason for hiding this comment

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

moduleDetails.getParent() will return the full qualified name of the parent, while RuleMetadata expects the simple name of the parent. This breaks the plugin.

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.

3 participants