This directory contains centralized linting and code quality scripts for the CF Java Plugin project.
Python-specific linting and formatting script.
Usage:
./scripts/lint-python.sh [check|fix|ci]Modes:
check(default): Check code quality without making changesfix: Auto-fix formatting and import sorting issuesci: Strict checking for CI environments
Tools used:
flake8: Code linting (line length, style issues)black: Code formattingisort: Import sorting
Go-specific linting and testing script.
Usage:
./scripts/lint-go.sh [check|test|ci]Modes:
check(default): Run linting checks onlyci: Run all checks for CI environments (lint + dependencies)
Tools used:
go fmt: Code formattinggo vet: Static analysis
Comprehensive script that runs both Go and Python linting.
Usage:
./scripts/lint-all.sh [check|fix|ci]Features:
- Runs Go linting first, then Python (if test suite exists)
- Provides unified exit codes and summary
- Color-coded output with status indicators
- Uses
lint-go.sh checkfor Go code - Uses
lint-python.sh fixfor Python code (auto-fixes issues)
- Build & Snapshot: Uses
cimode for strict checking - PR Validation: Uses
cimode for comprehensive validation - Release: Uses
checkandtestmodes
- Local development: Use
checkmode for quick validation - Before commit: Use
fixmode to auto-resolve formatting issues - CI/CD: Uses
cimode for strict validation
- No Duplication: Eliminates repeated linting commands across files
- Consistency: Same linting rules applied everywhere
- Maintainability: Single place to update linting configurations
- Flexibility: Different modes for different use cases
- Error Handling: Proper exit codes and error messages
- Auto-fixing: Reduces manual intervention for formatting issues
All linting tools are configured via:
test/pyproject.toml: Python tool configurationstest/requirements.txt: Python tool dependencies- Project-level files: Go module and dependencies
Virtual environments and build artifacts are automatically excluded from all linting operations.