feat(healthcheck): use simpler ignore.Match
This commit is contained in:
		
							parent
							
								
									0ea7672640
								
							
						
					
					
						commit
						dff6e35572
					
				| 
						 | 
				
			
			@ -32,12 +32,7 @@ func getForbiddens(root string) ([]string, error) {
 | 
			
		|||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		// Get the relative path to the git repo root
 | 
			
		||||
		relPath, err := filepath.Rel(root, path)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
		match := ignore.Relative(relPath, true)
 | 
			
		||||
		match := ignore.Match(path)
 | 
			
		||||
 | 
			
		||||
		// Check if the relative file path should be ignored based on the .gitignore rules
 | 
			
		||||
		if match != nil && match.Ignore() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user