Skip to content

Use 'if' to create completions#27

Merged
aeschli merged 6 commits intomicrosoft:masterfrom
Levertion:if-completions
Oct 29, 2018
Merged

Use 'if' to create completions#27
aeschli merged 6 commits intomicrosoft:masterfrom
Levertion:if-completions

Conversation

@Levertion
Copy link
Contributor

I'm not certain that this implementation is correct for the codebase, but it doesn't break any of the other tests (as added in #24) and passes my new test. @Fer0x: if you could validate that this looks right too.

I've only added one test case, but want to check that this feature is desired before adding more tests.

@msftclas
Copy link

msftclas commented Sep 5, 2018

CLA assistant check
All CLA requirements met.

@aeschli
Copy link
Collaborator

aeschli commented Sep 6, 2018

Cool!
What do you think about the following:
if if already matches, we could also suggest the then schema, otherwise the else and the if

@Levertion
Copy link
Contributor Author

I think that should already be what is happening, although I haven't validated it. I was more worried that I was breaking some invariants of SchemaCollector in my code, as there is not very much documentation

@Fer0x
Copy link

Fer0x commented Sep 16, 2018

@Levertion works correct for me. Thanks for enhancement.

@aeschli
Copy link
Collaborator

aeschli commented Oct 24, 2018

@Levertion The test is still failing...

@Levertion
Copy link
Contributor Author

Sorry, I've been busy with other stuff. My latest commit was to clear my working tree before I opened #30.
I should now have the time to look into finishing these tests, so I'll do that now.

@Levertion
Copy link
Contributor Author

Levertion commented Oct 24, 2018

OK - I've written enough tests to convince myself that the behaviour is correct, although I'm unsure about the formatting.

Should we format automatically somehow - clearly the style is to use ', but my personal habit is to use " so that is what I have used. I would expect there to be automatic formatting, but the builtin vscode formatting changes the style of the rest of the file, prettier is not being used and the tslint rules used does not control formatting.

My personal preference is prettier, but if the current formatting needs manually editing, let me know.

@aeschli
Copy link
Collaborator

aeschli commented Oct 24, 2018

just use the built-in TypeScript formatter with default settings

@Levertion
Copy link
Contributor Author

I have tried that, using both format document and format selection after commenting out my entire settings.json and disabling all extensions for the workspace. This however led to only the minimal diff seen in 9f3ac83, which doesn't seem optimal. Is that enough?

@aeschli
Copy link
Collaborator

aeschli commented Oct 24, 2018

Yes, that's fine. The formatter preserves new lines, that's why the changes are so small.

@Levertion
Copy link
Contributor Author

Well in that case I think this PR is finished, unless there are any other changes you want me to make

@aeschli aeschli merged commit 15e5a63 into microsoft:master Oct 29, 2018
@aeschli
Copy link
Collaborator

aeschli commented Oct 29, 2018

It's great, thanks a lot @Levertion !

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

Successfully merging this pull request may close these issues.

4 participants