-
Notifications
You must be signed in to change notification settings - Fork 22
SA1027
ptittof57 edited this page Aug 15, 2015
·
3 revisions
<title>SA1027: TabsMustNotBeUsed</title>
<script src="script/helpstudio.js" type="text/javascript"></script>
<script src="script/StandardText.js" type="text/jscript"></script>
<script type="text/jscript">WritePageTop(document.title);</script>
TypeName |
TabsMustNotBeUsed |
CheckId |
SA1027 |
Category |
Spacing Rules |
The C# code contains a tab character.
A violation of this rule occurs whenever the code contains a tab character.
Tabs should not be used within C# code, because the length of the tab character can vary depending upon the editor being used to view the code. This can cause the spacing and indexing of the code to vary from the developer’s original intention, and can in some cases make the code difficult to read.
For these reasons, tabs should not be used, and each level of indentation should consist of four spaces. This will ensure that the code looks the same no matter which editor is being used to view the code.
To fix a violation of this rule, remove the tab character from the code.
[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1027:TabsMustNotBeUsed", Justification = "Reviewed.")]
- - SA0102 - Clean Install
- - Download
- - Documentation Rules - Layout Rules - Maintainability Rules - Naming Rules - Ordering Rules - Readability Rules - Spacing Rules - Suppressions
- - Adding a custom StyleCop settings page - Adding custom rule settings - Authoring a custom styleCop rule - Authoring rules metadata - Custom CSharp Language Service - Custom MSBuild Integration - Hosting StyleCop in a Custom Environment - Installing a Custom Rule - Integrating StyleCop Into Build Environments - Integrating StyleCop into MSBuild - Writing Custom Rules for StyleCop