17 lines
		
	
	
		
			329 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			329 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| RED='\033[0;31m'
 | |
| BRED='\033[1;31m'
 | |
| NC='\033[0m'
 | |
| 
 | |
| diff=$(cargo clippy --all -- -D warnings -D clippy::unwrap_used)
 | |
| result=$?
 | |
| 
 | |
| if [[ ${result} -ne 0 ]] ; then
 | |
|   echo -e "\n${BRED}Cannot commit:${NC} There are some clippy issues in your code, check the above output for any errors."
 | |
|   exit 1
 | |
| fi
 | |
| 
 | |
| cargo fmt --all
 | |
| 
 | |
| exit 0 | 
