Skip to content
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

Use FormatOnSave setting in Settings.XamlStyler #161

Closed
tmatz opened this issue Sep 6, 2018 · 5 comments · Fixed by #227
Closed

Use FormatOnSave setting in Settings.XamlStyler #161

tmatz opened this issue Sep 6, 2018 · 5 comments · Fixed by #227

Comments

@tmatz
Copy link
Contributor

tmatz commented Sep 6, 2018

Please use "FormatOnSave" setting in "Settings.XamlStyler" file.

I want to format XAML files only in the specific projects.

  • Root/
    • Solution.sln
    • Settings.XamlStyler setting 1: FormatOnSave = false
    • Project1/
      - Project1.csproj
      - Project1.xaml
    • Project2/
      - Project2.csproj
      - Project2.xaml
      - Settings.XamlStyler setting 2: FormatOnSave = true

Project1.xaml is not formatted on save (according to setting 1).

Project2.xaml is formatted on save (according to setting 2).

@grochocki grochocki changed the title Feature: Use FormatOnSave setting in Settings.XamlStyler Use FormatOnSave setting in Settings.XamlStyler Oct 21, 2018
@valsby
Copy link

valsby commented Oct 1, 2019

According to the Wiki page configuration file, it seems possible to set the FormatOnSave configuration - but it seems to be ignored. Do I do something wrong, or is it ignored? Can you only set this setting through VS? I am using VS 17.

@grochocki
Copy link
Contributor

According to the Wiki page configuration file, it seems possible to set the FormatOnSave configuration

Hmm, you are right. Let me dig into this to see whether it was intended to be include in the config and at some point it regressed, or was unintentionally added and isn't respected at all.

@tmatz
Copy link
Contributor Author

tmatz commented Dec 2, 2019

Implemented here tmatz@1d4bdbc .

@grochocki
Copy link
Contributor

@tmatz Feel free to submit a PR with your change. Looks good (I am not the biggest fan of early returns, but we are not consistent anyways...)!

@tmatz
Copy link
Contributor Author

tmatz commented Dec 3, 2019

@grochocki Thank you! I submitted PR now. I added fix description about default value of FormatOnSave.

@grochocki grochocki added this to the 3.3 milestone Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants