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

feat: support CLRF #15

Merged
merged 2 commits into from
Jul 8, 2019
Merged

feat: support CLRF #15

merged 2 commits into from
Jul 8, 2019

Conversation

P0lip
Copy link
Contributor

@P0lip P0lip commented Jun 16, 2019

No description provided.

@P0lip P0lip requested a review from billiegoose June 16, 2019 07:59
@P0lip
Copy link
Contributor Author

P0lip commented Jun 16, 2019

Actually nvm, it's supported quite correctly, I think.

@P0lip P0lip closed this Jun 16, 2019
@P0lip P0lip reopened this Jul 8, 2019
Copy link
Contributor

@XVincentX XVincentX left a comment

Choose a reason for hiding this comment

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

I guess this is ok, right?

@P0lip
Copy link
Contributor Author

P0lip commented Jul 8, 2019

Don't merge it yet.

@P0lip P0lip force-pushed the feat/STU-296/clrf-support branch from 309a12d to c989ec5 Compare July 8, 2019 11:06
@@ -0,0 +1,6 @@
---
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bit weird case.
Usually, our YAML files start with actual nodes... but not on this occasion.
I decided to report 0 line and 0 character if a given path cannot be found in a document.
Reporting actual character does not make much sense since there is no node there anyway.
Ideally, we would report the second line, as this is where the actual document starts.

@marbemac thoughts? Going with the latter idea will require a few changes, but it's doable.

Copy link
Contributor

Choose a reason for hiding this comment

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

How is --- represented in the AST? What happens in the following situation - what line is Foo reported as?

---
---

Foo

});

it('should handle null-ish items', () => {
const result = parseWithPointers(`----~
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discovered this issue while playing around with fixtures.
Unfortunately, yaml-ast-parser typings are broken, and they don't take nulls into account at all, even though most of the nodes or properties are nullable.

@P0lip P0lip merged commit 5ace034 into master Jul 8, 2019
@P0lip P0lip deleted the feat/STU-296/clrf-support branch July 8, 2019 18:56
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 2.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

5 participants