Added pre-commit config
This commit is contained in:
		
							parent
							
								
									a9d97b6797
								
							
						
					
					
						commit
						76b28c4ee1
					
				
					 2 changed files with 15 additions and 1 deletions
				
			
		
							
								
								
									
										4
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -20,6 +20,8 @@ jobs:
 | 
			
		|||
      - name: Calculate build matrix
 | 
			
		||||
        id: set-matrix
 | 
			
		||||
        run: |
 | 
			
		||||
          # Use `-c` flag with jq for compact output (doesn't keep newlines in
 | 
			
		||||
          # output which was causing issues when setting the output
 | 
			
		||||
          matrix=$(nix flake show --json | jq -c '.nixosConfigurations | keys')
 | 
			
		||||
          echo "::set-output name=matrix::$matrix"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -30,7 +32,7 @@ jobs:
 | 
			
		|||
      - calculate-matrix
 | 
			
		||||
    strategy:
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
      matrix: 
 | 
			
		||||
      matrix:
 | 
			
		||||
        target: "${{ fromJson(needs.calculate-matrix.outputs.matrix) }}"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										12
									
								
								.pre-commit-config.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								.pre-commit-config.yaml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
repos:
 | 
			
		||||
  - repo: https://github.com/pre-commit/pre-commit-hooks
 | 
			
		||||
    rev: v4.3.0
 | 
			
		||||
    hooks:
 | 
			
		||||
      - id: trailing-whitespace
 | 
			
		||||
      - id: end-of-file-fixer
 | 
			
		||||
      - id: check-yaml
 | 
			
		||||
      - id: check-added-large-files
 | 
			
		||||
  - repo: https://github.com/kamadorueda/alejandra
 | 
			
		||||
    rev: 3.0.0
 | 
			
		||||
    hooks:
 | 
			
		||||
      - id: alejandra-system
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue