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

Add unit test which parses the files to make sure they are valid #105

Open
digulla opened this issue Oct 21, 2020 · 5 comments
Open

Add unit test which parses the files to make sure they are valid #105

digulla opened this issue Oct 21, 2020 · 5 comments

Comments

@digulla
Copy link

digulla commented Oct 21, 2020

Please add a unit test that tries to read all *.eea files and makes sure the syntax is valid.

Background: In my Eclipse (since 2020-06 or 4.16), the annotate menu is broken and doesn't allow me to create annotations anymore (nothing happens when I select the item and the child menus which were there before are missing).

So I need a way to validate the hand-crafted annotations.

@jason-faust
Copy link
Contributor

Do you happen to know which annotation is causing the failure?

@jason-faust
Copy link
Contributor

@J-N-K I started writing a new validator to address this. Can you take a look at branch eea-validate and give some feedback / opinion on where it stands?

@J-N-K
Copy link
Member

J-N-K commented Nov 8, 2020

There is a validation, it checks the signatures of the annotations against the signature of the method and the file format:

https://github.com/lastnpe/eclipse-null-eea-augments/tree/master/libraries/eea-all/src/test/java/org/lastnpe/eea/test

Accidentally I created a wrong annotation (while trying to solve #116) and the build failed. Can you show which malformed annotation is not detected?

@jason-faust Isn't improving the test-code easier than creating a custom maven plugin?

@jason-faust
Copy link
Contributor

@J-N-K The test code felt too hacky for me, the way it was wired. It deferred testing of the annotations till the full build, instead of a project by project basis.

Also, I'm not sure how to resolve the 'verify signature' part of the old validator. We've said we don't care if the annotation match the library version any longer, so there's no logical way to say if a signature is good or not, beyond syntax. Do you think Syntax will be sufficient?

@J-N-K
Copy link
Member

J-N-K commented Nov 8, 2020

I don't know much about the development of maven plugins, if you can't get the declared dependencies, I would guess that having a syntax check for the single project build and having the signature check in the full build is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants