mirror of
				https://github.com/langgenius/dify.git
				synced 2025-11-03 20:33:00 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			461 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			461 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
set -x
 | 
						|
 | 
						|
# style checks rely on commands in path
 | 
						|
if ! command -v ruff &> /dev/null || ! command -v dotenv-linter &> /dev/null; then
 | 
						|
    echo "Installing linting tools (Ruff, dotenv-linter ...) ..."
 | 
						|
    poetry install -C api --only lint
 | 
						|
fi
 | 
						|
 | 
						|
# run ruff linter
 | 
						|
poetry run -C api ruff check --fix ./
 | 
						|
 | 
						|
# run ruff formatter
 | 
						|
poetry run -C api ruff format ./
 | 
						|
 | 
						|
# run dotenv-linter linter
 | 
						|
poetry run -P api dotenv-linter ./api/.env.example ./web/.env.example
 |