mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-11-04 00:51:56 +00:00 
			
		
		
		
	Add Clippy linter step to CICD
Run the linter on the minimum supported rust version; otherwise we will get lint warnings for things that require a too high Rust toolchain version to fix. Allow the following checks, since we already violate them our code: - clippy::new-without-default - clippy::match-bool - clippy::if_same_then_else Eventually we should fix these lint issues and then disallow them to prevent them from coming back in other places. The clippy args used is recommended here: https://github.com/rust-lang/rust-clippy#travis-ci
This commit is contained in:
		
				
					committed by
					
						
						David Peter
					
				
			
			
				
	
			
			
			
						parent
						
							73d9a95862
						
					
				
				
					commit
					28f3f3c9c9
				
			
							
								
								
									
										6
									
								
								.github/workflows/CICD.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/CICD.yml
									
									
									
									
										vendored
									
									
								
							@@ -22,6 +22,12 @@ jobs:
 | 
			
		||||
        toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
 | 
			
		||||
        default: true
 | 
			
		||||
        profile: minimal # minimal component installation (ie, no documentation)
 | 
			
		||||
        components: clippy
 | 
			
		||||
    - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
 | 
			
		||||
      uses: actions-rs/cargo@v1
 | 
			
		||||
      with:
 | 
			
		||||
        command: clippy
 | 
			
		||||
        args: --all-targets --all-features -- --deny warnings --allow clippy::new-without-default --allow clippy::match-bool --allow clippy::if_same_then_else
 | 
			
		||||
    - name: Test
 | 
			
		||||
      uses: actions-rs/cargo@v1
 | 
			
		||||
      with:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user