Closed pavelkornev closed 11 months ago
This issue was caused mainly by our misuse of the YAML parser. We used YAML parser for both — YAML & JSON files. Due to some other differences in YAML parser behaviour with working with JSON files, we decided to differentiate explicitly these file types and use a proper parser for each.
So, this issue is no longer relevant -> closing.
Hi i am still getting the same issue, could provide explaination on how it was resolved (since this issue is closed)
Yeah not sure why it's closed ... I don't get thousands of errors but I do get one error per line, which is enough to totally obscure any real problems.
Adding that we are also still seeing this issue. Seems like its not actually resolved?
User story. In our org we have lots of legacy APIs which are using tabs as indentation. In this case Spectral produces lots of Warnings from the parser with a message
Using tabs can lead to unpredictable results
.When I say "lots of", I mean it's really abnormally massive number... for the attached real-world OpenAPI file Spectral generates 21931 parser Warnings (22 THOUSANDS for a single file).
The problem with this is that other more serious issues simply invisible in this massive spam from this Warning...
Related issues: https://github.com/stoplightio/spectral/issues/1550
Describe the solution you'd like Return a single Warning of this kind per file. Normally, the file is using either tabs, or spaces. In case of tabs, it doesn't make sense to spam the output with the same issue for each occurrence. If developer decides to change indentation in the file, most likely (s)he will use IDE feature for that which will change it for the whole file anyway, not just in one single occurrence.
BTW, Could you please give us some guidance on what kind of unpredictable results the users may face if they use tabs in their OpenAPI files? This is the most frequently asked question when they see this issue from the tooling.
Thank you.