forked from quickshell/quickshell
		
	tools: use parallel to run clang-tidy
This commit is contained in:
		
							parent
							
								
									cfd9a27619
								
							
						
					
					
						commit
						e6d2426a5a
					
				
					 2 changed files with 3 additions and 8 deletions
				
			
		
							
								
								
									
										10
									
								
								Justfile
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								Justfile
									
										
									
									
									
								
							| 
						 | 
					@ -1,16 +1,10 @@
 | 
				
			||||||
builddir := 'build'
 | 
					builddir := 'build'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
with_cpphpp := 'find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0'
 | 
					 | 
				
			||||||
with_cpp := 'find src -type f -name "*.cpp" -print0 | xargs -0'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
fmt:
 | 
					fmt:
 | 
				
			||||||
    {{with_cpphpp}} clang-format -i
 | 
					    find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i
 | 
				
			||||||
 | 
					
 | 
				
			||||||
lint:
 | 
					lint:
 | 
				
			||||||
    {{with_cpp}} clang-tidy --load={{ env_var("TIDYFOX") }}
 | 
						find src -type f -name "*.cpp" -print0 | parallel -q0 --eta clang-tidy --load={{ env_var("TIDYFOX") }}
 | 
				
			||||||
 | 
					 | 
				
			||||||
fixlint:
 | 
					 | 
				
			||||||
    {{with_cpp}} clang-tidy --load={{ env_var("TIDYFOX") }}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
configure target='debug' *FLAGS='':
 | 
					configure target='debug' *FLAGS='':
 | 
				
			||||||
	cmake -B {{builddir}} \
 | 
						cmake -B {{builddir}} \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,6 +10,7 @@ in pkgs.mkShell {
 | 
				
			||||||
  nativeBuildInputs = with pkgs; [
 | 
					  nativeBuildInputs = with pkgs; [
 | 
				
			||||||
    just
 | 
					    just
 | 
				
			||||||
    clang-tools_17
 | 
					    clang-tools_17
 | 
				
			||||||
 | 
					    parallel
 | 
				
			||||||
    cmake
 | 
					    cmake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pkg-config
 | 
					    pkg-config
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue