mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-10-30 23:57:43 +02:00 
			
		
		
		
	Merge pull request #2578 from jesseduffield/enforce-lowercase-filenames
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -140,6 +140,8 @@ jobs: | |||||||
|         run: | |         run: | | ||||||
|           go generate pkg/integration/tests/tests.go && git diff --exit-code || (echo "Integration test list not up to date. Run 'go generate pkg/integration/tests/tests.go' locally and commit the changes" && exit 1) |           go generate pkg/integration/tests/tests.go && git diff --exit-code || (echo "Integration test list not up to date. Run 'go generate pkg/integration/tests/tests.go' locally and commit the changes" && exit 1) | ||||||
|         shell: bash # needed so that we get "-o pipefail" |         shell: bash # needed so that we get "-o pipefail" | ||||||
|  |       - name: Check Filenames | ||||||
|  |         run: scripts/check_filenames.sh | ||||||
|   lint: |   lint: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     env: |     env: | ||||||
|   | |||||||
							
								
								
									
										14
									
								
								scripts/check_filenames.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								scripts/check_filenames.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | #!/bin/bash | ||||||
|  |  | ||||||
|  | # Find all Go files in the project directory and its subdirectories, except in the vendor directory | ||||||
|  | for file in $(find . -name "*.go" -not -path "./vendor/*"); do | ||||||
|  |  | ||||||
|  |   # Check if the file name contains uppercase letters | ||||||
|  |   if [[ "$file" =~ [A-Z] ]]; then | ||||||
|  |     echo "Error: $file contains uppercase letters. All Go files in the project (excluding vendor directory) must use snake_case" | ||||||
|  |     exit 1 | ||||||
|  |   fi | ||||||
|  | done | ||||||
|  |  | ||||||
|  | echo "All Go files in the project (excluding vendor directory) use lowercase letters" | ||||||
|  | exit 0 | ||||||
		Reference in New Issue
	
	Block a user