mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 09:02:12 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			680 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			680 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
DEFAULT_DIRS=(
 | 
						|
        wa
 | 
						|
)
 | 
						|
 | 
						|
EXCLUDE=wa/tests,wa/framework/target/descriptor.py
 | 
						|
EXCLUDE_COMMA=
 | 
						|
IGNORE=E501,E265,E266,W391,E401,E402,E731,W504,W605,F401
 | 
						|
 | 
						|
if ! hash flake8 2>/dev/null; then
 | 
						|
	echo "flake8 not found in PATH"
 | 
						|
	echo "you can install it with \"sudo pip install flake8\""
 | 
						|
	exit 1
 | 
						|
fi
 | 
						|
 | 
						|
if [[ "$1" == "" ]]; then
 | 
						|
	THIS_DIR="`dirname \"$0\"`"
 | 
						|
	pushd $THIS_DIR/.. > /dev/null
 | 
						|
	for dir in "${DEFAULT_DIRS[@]}"; do
 | 
						|
		flake8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE $dir
 | 
						|
	done
 | 
						|
	flake8 --exclude=$EXCLUDE --ignore=$IGNORE,E241 $(echo "$EXCLUDE_COMMA" | sed 's/,/ /g')
 | 
						|
	popd > /dev/null
 | 
						|
else
 | 
						|
	flake8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE $1
 | 
						|
fi
 | 
						|
 |