Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.

Conversation

jeremymcgee73
Copy link
Contributor

@jeremymcgee73 jeremymcgee73 commented Oct 22, 2018

I was having issues with Line Endings with git and VSC. I added a git attribute file so that git will know what line endings to use with PowerShell files in this repo. I believe this will make other contributors lives a bit easier.

I followed this blog post.

*Edit for maintainer:
Related issue #148

@Tiberriver256
Copy link
Contributor

Nice, I was thinking about adding in something like this as well. Another great addition if you want to throw it in there would be a .editorconfig file. This would take care of configuring any editors (VSCode / Vim) to use LF when they are creating new files within a project.

And probably a .vscode folder with an extensions.json file with the following content:

{
  "recommendations": [
    "EditorConfig.EditorConfig"
  ]
}

This way VSCode users would get prompted to install the editorconfig extension to work with the .editorconfig file.

This will help a lot I think to make it easier for people to work across development environments. Thank you for thinking of this!

If you don't want to mess with the editorconfig just let me know. I can set it up and do a separate pull request. This is great.

@jeremymcgee73
Copy link
Contributor Author

I will take a look next week and see if I can add the editor file as well. Thanks!

@jeremymcgee73
Copy link
Contributor Author

Actually @Tiberriver256 I think I will hold off on the .editorconfig file for now. Do you think you could take a look? I've been working on getting ADFS/OpenID/Oauth working 😊

@Tiberriver256
Copy link
Contributor

Cool yeah that's no worry. I can grab it. @tylerl0706 do you know of an easy way to re-trigger to build? Looks like the ubuntu image wasn't available for some reason during the last attempt otherwise I think we can merge this in.

@Tiberriver256 Tiberriver256 changed the title Added git attributes for Line Endings Fix #148: Added git attributes for Line Endings Nov 1, 2018
.gitattributes Outdated

*.ps1 text eol=lf
*.psd1 text eol=lf
*.psm1 text eol=lf No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: add a new line at the end of this file. It's usually best practice.

@TylerLeonhardt
Copy link
Member

re kicked the build!

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

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

LGTM - just a small nitpick.

Also, the ps1 and psd1... is that changing the line endings of those files? Otherwise, they're identical right?

Co-Authored-By: jeremymcgee73 <jeremymcgee6@gmail.com>
@jeremymcgee73
Copy link
Contributor Author

Can someone just double check the Line Endings on the files? I just want to make sure I'm changing the back to LF and not to CRLF. @tylerl0706 @Tiberriver256 Thanks!

@Tiberriver256
Copy link
Contributor

Nope you're good. The Polaris.psd1 looks like the only one that got switched to CRLF at one point or another and it looks to be LF in your repository now. Thank you!

@Tiberriver256 Tiberriver256 merged commit 35cf0a2 into PowerShell:master Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants