I want to enforce usage of brackets for if-loop in my .editorconfig file. I don't know the right syntax to do that. I am using VS-2017.
If I commit my .editorconfig file into git-tfs 2015, can my team use this so that there is uniformity in code-style in the project? Will it also run along with my solution during build process and throw warnings and errors if found? Right now, it is working fine and is throwing warnings and errors in my system when built in my system.
VS will use a .editorconfig
in the right location in the file system whether in a VCS or not: it will work across teams.
enforce usage of brackets for if-loop
But there is no direct setting for this in .editorconfig
: you can control the brace placement but not a requirement for their existence. (Noting the comment to the question: since I always add the braces I don't see warnings for this.)