Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added files option #52

Merged
merged 28 commits into from Mar 21, 2019
Merged

Added files option #52

merged 28 commits into from Mar 21, 2019

Conversation

ghost
Copy link

@ghost ghost commented Mar 14, 2019

I added a --files option that takes a comma-delimited string and only formats those files. I think I got everything, but if there's anything I missed or needs changing (or is wrong 😆), let me know!

This is for issue #9.

@dnfclas
Copy link

dnfclas commented Mar 14, 2019

CLA assistant check
All CLA requirements met.

@ghost
Copy link
Author

ghost commented Mar 17, 2019

@JoeRobich @jmarolf @sharwell I am getting build errors because an xlf file is out-of-date with the resx file. I'm not familiar with the xlf files. Is there something I need to do to generate them in the build script?

@JoeRobich JoeRobich self-assigned this Mar 19, 2019
Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

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

@challen0 Thanks for taking this on!

As for the XLF issue, looks like maybe the rebuilt Resources.de.xlf didn't get committed with the others.

tests/CodeFormatterTests.cs Show resolved Hide resolved
tests/CodeFormatterTests.cs Outdated Show resolved Hide resolved
src/CodeFormatter.cs Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Mar 20, 2019

@JoeRobich thanks for pointing out the broken XLF file!

I wanted to bring up an issue I ran into when testing. If you pass path/to/file (note forward slashes) on the CLI on Windows, the way the code currently works, it won't find it. Do you think that will be an issue?

@JoeRobich
Copy link
Member

@challen0 I think you could spin through the files calling Path.GetRelativePath(Environment.CurrentDirectory, filePath) to correct this for each platform. https://docs.microsoft.com/en-us/dotnet/api/system.io.path.getrelativepath?view=netcore-2.2

@zubivan
Copy link

zubivan commented Mar 20, 2019

Awesome, was also thinking to pick up this issue. Great work!

src/CodeFormatter.cs Outdated Show resolved Hide resolved
src/Program.cs Outdated Show resolved Hide resolved
Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

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

@challen0 Thanks for contributing!

@JoeRobich JoeRobich merged commit 822c036 into dotnet:master Mar 21, 2019
@ghost ghost deleted the feature/cli-files-option branch March 22, 2019 00:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants