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

Add more test cases. #502

Merged
merged 1 commit into from
Dec 11, 2016
Merged

Conversation

JimiC
Copy link
Member

@JimiC JimiC commented Dec 11, 2016

This PR does the following:

@JimiC
Copy link
Member Author

JimiC commented Dec 11, 2016

Prolog reestablished.

"rules": {
"linebreak-style": "off",
Copy link
Member

Choose a reason for hiding this comment

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

eol should be set to \n. My bad for not setting it into the .vscode/settings.json or an .editorConfig file. I'll do it so this won't be an issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

My git is set to change the eol to CRLF when pull and LF when pushas I'm on Windows. The rule is colliding with that. There isn't going to be an issue if we disable the rule.

Copy link
Member

Choose a reason for hiding this comment

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

I will upload a .gitattributes file so that won't be an issue for you anymore. I'm using autocrlf = input.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool.

@@ -1,5 +1,4 @@
module.exports = {
exports.languages = {
Copy link
Member

Choose a reason for hiding this comment

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

Why this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Sorry @JimiC but I still don't get the rationale here. Could you ellaborate this change?

Copy link
Member Author

@JimiC JimiC Dec 11, 2016

Choose a reason for hiding this comment

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

We aren't actually exporting a module per say, but a helper object, which falls into the category of the exports case.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's the same as we do with supportedExtensions, supportedFolders, defaultSchema.

Copy link
Member

Choose a reason for hiding this comment

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

To be honest, I still don't see the point. As far as I know this is a matter of preference and its use will depend greatly on the way we're going to compose our module. Being this just the only export, I don't see this syntactic change as if it's bringing some benefit to the table.

The examples you reference are composed like that (in the case of supportedExtensions and supportedFolders) because when I first built the extension I thought that they were going to export more items. Finally they remained like that. No other reason behind it. In fact, I've thought of refactoring these modules for a long time but I've been a little bit careless with style in this project.

The way I see it, if I know my module is going to only export one item I don't like creating extra properties. It's like a default for ES5, in this case.

You see I may have also something in my inheritance that leans me towars bizantine discussions 😜

In order to close this, let's keep it this way for the sake of consistency as I myself haven't made it clear in the code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you want me to change every exports to module.exports? I can do that.

Copy link
Member

Choose a reason for hiding this comment

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

No, no, don't worry @JimiC. I just wanted to understand why you decided to change this. I thought that maybe it was something that I was missing but now I see it's consistency or preference what was driving you.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. Once again I failed to express myself clearly. 😞

{ icon: 'ng2_service_js', extensions: ['.service.js'], svg: true },
{ icon: 'ng2_module_ts', extensions: ['.module.ts'], svg: true },
{ icon: 'ng2_module_js', extensions: ['.module.js'], svg: true },
{ icon: 'ng2_component_ts', extensions: ['.component.ts'], filename: true, svg: true },
Copy link
Member

Choose a reason for hiding this comment

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

This was already commented in another PR. Why the filename property?

Copy link
Member Author

Choose a reason for hiding this comment

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

As mentioned in the other PR, will revise.

Copy link
Member

Choose a reason for hiding this comment

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

Cool! 👍

@@ -144,7 +144,7 @@ exports.extensions = {
{ icon: 'phpunit', extensions: ['phpunit.xml'], filename: true },
{ icon: 'plantuml', extensions: ['pu', 'plantuml', 'iuml', 'puml'] },
{ icon: 'procfile', extensions: ['procfile'], filename: true },
{ icon: 'prolog', extensions: ['P', 'pro'], languages: [languages.prolog] },
Copy link
Member

Choose a reason for hiding this comment

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

LanguageIds can be added via plugins. In the case of Prolog you can find the extension here and if you see their contribution point you'll see that the id of prolog was correct.

@JimiC
Copy link
Member Author

JimiC commented Dec 11, 2016

OK, I figured it out. It was the damn dot that was screwing with me.
I also removed the lint rule about the line breaks.

@robertohuertasm robertohuertasm merged commit 438435f into vscode-icons:master Dec 11, 2016
@JimiC JimiC deleted the more_tests branch December 11, 2016 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants