forked from fediversity/fediversity
		
	Clean up pre-commit opt-out mechanism
This commit is contained in:
		
							parent
							
								
									4e30363c5f
								
							
						
					
					
						commit
						44a69fb376
					
				
					 1 changed files with 6 additions and 13 deletions
				
			
		
							
								
								
									
										19
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										19
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -33,6 +33,7 @@ | |||
|         { | ||||
|           config, | ||||
|           pkgs, | ||||
|           lib, | ||||
|           inputs', | ||||
|           ... | ||||
|         }: | ||||
|  | @ -44,20 +45,12 @@ | |||
|               ## Add a directory here if pre-commit hooks shouldn't apply to it. | ||||
|               optout = [ "npins" ]; | ||||
|               excludes = map (dir: "^${dir}/") optout; | ||||
|               addExcludes = lib.mapAttrs (_: c: c // { inherit excludes; }); | ||||
|             in | ||||
|             { | ||||
|               nixfmt-rfc-style = { | ||||
|                 enable = true; | ||||
|                 inherit excludes; | ||||
|               }; | ||||
|               deadnix = { | ||||
|                 enable = true; | ||||
|                 inherit excludes; | ||||
|               }; | ||||
|               trim-trailing-whitespace = { | ||||
|                 enable = true; | ||||
|                 inherit excludes; | ||||
|               }; | ||||
|             addExcludes { | ||||
|               nixfmt-rfc-style.enable = true; | ||||
|               deadnix.enable = true; | ||||
|               trim-trailing-whitespace.enable = true; | ||||
|             }; | ||||
| 
 | ||||
|           devShells.default = pkgs.mkShell { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue