Make the xaml formatting script work outside the root directory#10268
Merged
DHowett merged 1 commit intomicrosoft:mainfrom Jun 2, 2021
Merged
Make the xaml formatting script work outside the root directory#10268DHowett merged 1 commit intomicrosoft:mainfrom
DHowett merged 1 commit intomicrosoft:mainfrom
Conversation
DHowett
approved these changes
Jun 1, 2021
Member
DHowett
left a comment
There was a problem hiding this comment.
Thanks for this! I recently learned that :(top)**/*.xaml is valid as well and doesn't require propagating the path. Not a concern/complaint of course, just a cool thing. 😄
|
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
lhecker
approved these changes
Jun 2, 2021
carlos-zamora
approved these changes
Jun 2, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
When the
runformatscript was updated to include xaml formatting, the new code failed to work if run from anywhere other than the project root. This PR updates the script so it can be run from anywhere.PR Checklist
Detailed Description of the Pull Request / Additional comments
There were a couple of places in the script where it was collecting the list of xaml files by doing
git ls-files **/*.xaml. That obviously relies on the code being executed from within the root of the project. I've now updated those queries to prefix the path with the$rootvariable, which points to the project root.Validation Steps Performed
I've run the
runformatscript from within the tools directory and confirmed that it now works correctly from there. I've tested by changing some formatting in both .cpp and .xaml files, and also saved some .xaml files with a BOM to make sure those were appropriately stripped.