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

Multiple path patterns separated by new line break the plugin #114

Open
mimkorn opened this issue Nov 7, 2023 · 3 comments
Open

Multiple path patterns separated by new line break the plugin #114

mimkorn opened this issue Nov 7, 2023 · 3 comments

Comments

@mimkorn
Copy link

mimkorn commented Nov 7, 2023

Build #IU-232.10203.10, built on October 24, 2023

In the following GIF https://share.cleanshot.com/gGlty03m you can see that Spectral is installed, it is accessible in terminal anywhere with "spectral" command and it properly returns warnings in terminal, but no problems are shown in the IDEa for the same file. I quadruple-checked everything is correct and it doesn't work.

I found no spectral related errors in IntelliJ IDEa logs, nor any hints in the interface.

edit: edited the name to reflect the root cause as identified by @rkovarik below

@rkovarik
Copy link

rkovarik commented Nov 9, 2023

I had to go to Preferences -> Tools -> Spectral -> Included path patterns and change it to:
**/*openapi.yaml (remove other lines).
After closing and reopening openapi.yaml, it picked up the changes and showed the problems.

@mimkorn mimkorn changed the title Not working with IDEa 2023.2.4 Multiple path patterns separated by new line break the plugin Nov 9, 2023
@quadrrem
Copy link

I have the same problem with IntelliJ IDEA 2023.3.2 (Build #IU-233.13135.103, built on December 20, 2023) and plugin version 3.0.1.

The fix of @rkovarik solved the issue

@AlexKotsc
Copy link

AlexKotsc commented Feb 19, 2024

It seems that the newlines in the settings window get stored as 
 in the spectral.xml settings file.
This is not being parsed correctly by kotlins .lines() method.

Maybe serialize them using XCollection? https://github.com/JetBrains/intellij-community/blob/master/platform/util/src/com/intellij/util/xmlb/annotations/XCollection.java

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

4 participants