XamlStyler
XamlStyler copied to clipboard
Specify ignore file list in Settings.XamlStyler
I hope XamlStyler supports like a following setting:
{
:
"IgnoreFiles": [ "*-autogenerated.xaml", "MySpecialView.xaml", "importedViews/*", …],
:
}
I have a csproj file that contains many types of xaml file. Self-made files, copied files from GitHub, auto-generated files, and so on. I want to keep some of the files as is, so that I can keep tracking the differences from original source.
Unfortunately, current XamlStyler does not support the list to avoid styling. If it supports the feature, we can integrate it into CI more aggressively.
I would appreciate it if you could consider my request. Thanks.
If you want to use this in CI, I assume your primary goal is for the CLI version of XAML Styler to respect this new proposed setting? I am curious whether the settings file is the best place to specify this or something else might work better (e.g., a XamlStyler ignore file or an exclusion parameter for CLI).
Thanks for considering!
To specify exclusion items by CLI parameters are not so important for our goal, I think. Because we are doing CI well by using the settings file.
The ability to exclude directories is crucial for one of the newest features: Xaml Islands
The official sample is here: https://github.com/microsoft/Xaml-Islands-Samples
If the original files are formatted, the bin directory could contain unformatted files. At compile time, assets are copied into the bin directory and they don't always need to be checked.
$ xstyler.exe -p -r -d Samples/WPF/WPF_XAMLIslands_v1/
Checking: Samples/WPF/WPF_XAMLIslands_v1/App.xaml
PASS
Checking: Samples/WPF/WPF_XAMLIslands_v1/MainWindow.xaml
PASS
Checking: Samples/WPF/WPF_XAMLIslands_v1/bin\x64\Release\netcoreapp3.1\UILibrary\Themes\Generic.xaml
FAIL
2 of 3 files pass format check.