mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-04 10:35:27 +08:00 
			
		
		
		
	Adds documentation for analyzers
This commit is contained in:
		
				
					committed by
					
						
						Patrik Svensson
					
				
			
			
				
	
			
			
			
						parent
						
							a186fd94ac
						
					
				
				
					commit
					fa553fd72e
				
			
							
								
								
									
										38
									
								
								docs/input/analyzer/rules/RULE_TEMPLATE.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								docs/input/analyzer/rules/RULE_TEMPLATE.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
---
 | 
			
		||||
Title: SpectreXxxx
 | 
			
		||||
Description: Rule title
 | 
			
		||||
Category: Usage
 | 
			
		||||
Severity: Hidden, Info, Warning, or Error
 | 
			
		||||
Excluded: true
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
## Cause
 | 
			
		||||
 | 
			
		||||
A concise-as-possible description of when this rule is violated. If there's a lot to explain, begin with "A violation of this rule occurs when..."
 | 
			
		||||
 | 
			
		||||
## Reason for rule
 | 
			
		||||
 | 
			
		||||
Explain why the user should care about the violation.
 | 
			
		||||
 | 
			
		||||
## How to fix violations
 | 
			
		||||
 | 
			
		||||
To fix a violation of this rule, [describe how to fix a violation].
 | 
			
		||||
 | 
			
		||||
## Examples
 | 
			
		||||
 | 
			
		||||
### Violates
 | 
			
		||||
 | 
			
		||||
Example(s) of code that violates the rule.
 | 
			
		||||
 | 
			
		||||
### Does not violate
 | 
			
		||||
 | 
			
		||||
Example(s) of code that does not violate the rule.
 | 
			
		||||
 | 
			
		||||
## How to suppress violations
 | 
			
		||||
 | 
			
		||||
**If the severity of your analyzer isn't _Warning_, delete this section.**
 | 
			
		||||
 | 
			
		||||
```csharp
 | 
			
		||||
#pragma warning disable Spectre1000 // <Rule name>
 | 
			
		||||
#pragma warning restore Spectre1000 // <Rule name>
 | 
			
		||||
```
 | 
			
		||||
		Reference in New Issue
	
	Block a user