Add "exclude" option for godot linter (#1669)
This commit is contained in:
		
							parent
							
								
									5d75889cb1
								
							
						
					
					
						commit
						89367aee22
					
				| @ -193,6 +193,10 @@ linters-settings: | |||||||
|   godot: |   godot: | ||||||
|     # comments to be checked: `declarations`, `toplevel`, or `all` |     # comments to be checked: `declarations`, `toplevel`, or `all` | ||||||
|     scope: declarations |     scope: declarations | ||||||
|  |     # list of regexps for excluding particular comment lines from check | ||||||
|  |     exclude: | ||||||
|  |       # example: exclude comments which contain numbers | ||||||
|  |       # - '[0-9]+' | ||||||
|     # check that each sentence starts with a capital letter |     # check that each sentence starts with a capital letter | ||||||
|     capital: false |     capital: false | ||||||
|   godox: |   godox: | ||||||
|  | |||||||
| @ -357,6 +357,7 @@ type WSLSettings struct { | |||||||
| 
 | 
 | ||||||
| type GodotSettings struct { | type GodotSettings struct { | ||||||
| 	Scope   string   `mapstructure:"scope"` | 	Scope   string   `mapstructure:"scope"` | ||||||
|  | 	Exclude []string `mapstructure:"exclude"` | ||||||
| 	Capital bool     `mapstructure:"capital"` | 	Capital bool     `mapstructure:"capital"` | ||||||
| 
 | 
 | ||||||
| 	// Deprecated: use `Scope` instead | 	// Deprecated: use `Scope` instead | ||||||
|  | |||||||
| @ -30,6 +30,7 @@ func NewGodot() *goanalysis.Linter { | |||||||
| 		cfg := lintCtx.Cfg.LintersSettings.Godot | 		cfg := lintCtx.Cfg.LintersSettings.Godot | ||||||
| 		settings := godot.Settings{ | 		settings := godot.Settings{ | ||||||
| 			Scope:   godot.Scope(cfg.Scope), | 			Scope:   godot.Scope(cfg.Scope), | ||||||
|  | 			Exclude: cfg.Exclude, | ||||||
| 			Period:  true, | 			Period:  true, | ||||||
| 			Capital: cfg.Capital, | 			Capital: cfg.Capital, | ||||||
| 		} | 		} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Denis Krivak
						Denis Krivak