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

Opting out for specific known content types #850

Open
merks opened this issue Aug 20, 2022 · 5 comments
Open

Opting out for specific known content types #850

merks opened this issue Aug 20, 2022 · 5 comments

Comments

@merks
Copy link
Contributor

merks commented Aug 20, 2022

There should be a way to opt of validation for specific know content types.

The issue arises relates to this issue raised for PDE:

eclipse-pde/eclipse.pde#294

PDE has abused the XML Schema namespace for its own purpose leading to all kinds of validation errors that are not really errors for PDE's actual use of *.exsd resources.

Similarly a PDE *.target file doesn't specify a schema, but the editor knows the correct structure so a warning about the schema being missing is just noise to the user. Same for feature.xml, category.xml, plugin.xml, and *.product.

The Lemminx functionality is generally very cool and very useful, but it seems the only way to disable this for PDE's resources is to disable it in general, which definitely not desired either. Apparently the issue should not be addressed in LemMinx, as suggested by this comment:
eclipse-pde/eclipse.pde#294 (comment)

but rather in Wild Web Developer as suggested by this comment:

eclipse/lemminx#1275 (comment)

@angelozerr
Copy link
Contributor

to disable it in general, which definitely not desired either. Apparently the issue should not be addressed in LemMinx, as suggested by this comment:

LemMinX can only disable validation for all xml files. If you want to disable validation for a given files like *.exsd it will require to introduce a new settings.

You are saying that PDE has a good validator, but please keep in mind LemMinX provides and will provide again a lot of quickfix. I find it is shame to loose those quickfix which are available when validation is processed.

Disable validation for a given pattern file like *.exsd and ignoring error code for a given pattern like plugin.xml is a validation filter that LemMinX could provide and WWD could initiatize it.

I wonder if exsd file validation with LemMinX pronlems comes from à lot of error code loke src-annotation? If no perhaps we could enable xsd validation and ignore some error code. It will give the capability to benefit again with LemMinX quickix or future quickfix.

@mickaelistria
Copy link
Contributor

The idea wouldn't be to disable validation, but to disable LS connection entirely for a given content-type.
But I still challenge this is a good idea to implement frameworks for workarounds instead of fixing the real issue (which is that exsd file are not conforming to the namespace they do declare).

@angelozerr
Copy link
Contributor

If you do that you will loose all LemMinX features like linked editing range, rename, completion, hover etc. I think it is shame to loose all those features just for a validation matter.

@mickaelistria
Copy link
Contributor

Exsd files use a dedicated editor that make that lemminx features atlre not used anyway.

@angelozerr
Copy link
Contributor

Ok I see, I let you to fix the problem. If you need some improvement on lemMinX side, please ask me.

Thanks for taking care of this issue.

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

No branches or pull requests

3 participants