Skip to content

Feature: Add Xaml Styler GitHub Action #11379

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

Merged
merged 37 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7e776ce
Add xaml styler pipeline
heftymouse Feb 20, 2023
2f9bd52
change to github action
heftymouse Apr 2, 2023
8a0af8b
test
heftymouse Apr 2, 2023
30f76b4
test2
heftymouse Apr 2, 2023
b0b96fa
fix shell
heftymouse Apr 2, 2023
1e19fcf
add manual trigger
heftymouse Apr 2, 2023
ab33f2a
test3
heftymouse Apr 2, 2023
cc204b1
forgot to checkout
heftymouse Apr 2, 2023
874b9de
will this work?
heftymouse Apr 2, 2023
63aa5f5
print debugging ftw
heftymouse Apr 2, 2023
f6880c7
let's try that again
heftymouse Apr 2, 2023
67a95ea
even more print debugging
heftymouse Apr 2, 2023
dcbdfe6
it was that simple
heftymouse Apr 2, 2023
78cff41
this is so annoying
heftymouse Apr 2, 2023
09d3d58
trying random stuff
heftymouse Apr 2, 2023
6457941
more of the same
heftymouse Apr 2, 2023
4ded81d
save me
heftymouse Apr 2, 2023
d572fa7
a
heftymouse Apr 2, 2023
ed50244
b
heftymouse Apr 2, 2023
a536f07
c
heftymouse Apr 2, 2023
45d4404
d
heftymouse Apr 2, 2023
6b1b5e9
e
heftymouse Apr 2, 2023
674f41a
hopium
heftymouse Apr 2, 2023
c8c91c1
try annotations
heftymouse Apr 2, 2023
9920b58
failure
heftymouse Apr 2, 2023
4dd1cd7
pr test
heftymouse Apr 2, 2023
9544872
remove debugging stuff
heftymouse Apr 2, 2023
555d648
remove unused variable
heftymouse Apr 2, 2023
064eab0
do not run on draft prs
heftymouse Apr 2, 2023
7acac16
run on ready for review
heftymouse Apr 2, 2023
f0518b9
fix condition
heftymouse Apr 2, 2023
879397c
fix condition again
heftymouse Apr 2, 2023
3fff0be
im stupid
heftymouse Apr 2, 2023
b359dd2
try yet again
heftymouse Apr 2, 2023
5f537f4
give up
heftymouse Apr 2, 2023
ece94b3
give up some more
heftymouse Apr 2, 2023
d5e2d3f
Merge branch 'main' into pipelines
yaira2 Apr 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/check-xaml-formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Check XAML Formatting
on:
workflow_dispatch:
push:
branches:
- 'main'
- '**-servicing'
paths:
- '**.xaml'
pull_request:
branches:
- 'main'
- '**-servicing'
paths:
- '**.xaml'

jobs:
check-formatting:
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Install Xaml Styler
run: |
dotnet tool install --global XamlStyler.Console

- name: Check Formatting
id: check-step
run: |
$changedFiles = (git diff --name-only HEAD~1) -split "\n" | Where-Object {$_ -like "*.xaml"}
foreach ($file in $changedFiles)
{
xstyler -p -l None -f $file
if ($LASTEXITCODE -ne 0)
{
echo "::error file=$file::Format check failed"
}
}
continue-on-error: true

- name: Fail job if necessary
if: steps.check-step.outcome == 'failure'
run: exit 1

2 changes: 1 addition & 1 deletion nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<configuration>
<packageSources>
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
<add key="Local Packages" value="src\Files.App\nupkgs\" />
<add key="Local Packages" value="src/Files.App/nupkgs/" />
</packageSources>
</configuration>