Fix indent exclusion
The current dib-lint script has an exclusion for indent but it is erroneously used as a label around the tab indention check. This patch renames the tab indention exclusion and adds the indent exclusion where it belongs. Change-Id: I701595e7a08f4764a45c6701d67cbb931c3d47f3
This commit is contained in:
		@@ -71,8 +71,10 @@ for i in $(find elements -type f); do
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
        # Ensure 4 spaces indent are used
 | 
			
		||||
        if grep -q "^ \{4\}* \{1,3\}[^ ]" ${i}; then
 | 
			
		||||
            error "$i should use 4 spaces indent"
 | 
			
		||||
        if ! excluded indent; then
 | 
			
		||||
            if grep -q "^ \{4\}* \{1,3\}[^ ]" ${i}; then
 | 
			
		||||
                error "$i should use 4 spaces indent"
 | 
			
		||||
            fi
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
@@ -118,7 +120,7 @@ done
 | 
			
		||||
 | 
			
		||||
for i in $(find elements -type f -and -name '*.md' -or -type f -executable); do
 | 
			
		||||
    # Check for tab indentation
 | 
			
		||||
    if ! excluded indent; then
 | 
			
		||||
    if ! excluded tabindent; then
 | 
			
		||||
        if grep -q $'^ *\t' ${i}; then
 | 
			
		||||
            error "$i contains tab characters"
 | 
			
		||||
        fi
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user