refactor: move all remaining files to orig/ directory
Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
51
orig/scripts/analyze.sh
Executable file
51
orig/scripts/analyze.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
|
||||
# MEV Bot Comprehensive Analysis Script
|
||||
|
||||
echo "Running comprehensive analysis of the MEV bot system..."
|
||||
|
||||
# Ensure local Go cache directories are available for sandboxed environments
|
||||
PROJECT_ROOT="$(pwd)"
|
||||
export GOCACHE="${GOCACHE:-${PROJECT_ROOT}/.gocache}"
|
||||
export GOMODCACHE="${GOMODCACHE:-${PROJECT_ROOT}/.gomodcache}"
|
||||
export GOPATH="${GOPATH:-${PROJECT_ROOT}/.gopath}"
|
||||
export GOFLAGS="${GOFLAGS:--mod=vendor}"
|
||||
export GOLANGCI_LINT_CACHE="${GOLANGCI_LINT_CACHE:-${PROJECT_ROOT}/.golangci-cache}"
|
||||
|
||||
mkdir -p "$GOCACHE" "$GOMODCACHE" "${GOPATH}/pkg/mod" "$GOLANGCI_LINT_CACHE"
|
||||
|
||||
# Ensure imports are correct
|
||||
echo "Checking Go imports"
|
||||
goimports -w .
|
||||
|
||||
# Check go.mod for dependencies without modifying files
|
||||
echo "Checking Go module dependencies..."
|
||||
if ! go list ./cmd/... ./internal/... ./pkg/... > /dev/null; then
|
||||
echo "Dependency graph check failed; please review module configuration."
|
||||
fi
|
||||
|
||||
# Ensure log directory exists for tests that expect it
|
||||
mkdir -p logs
|
||||
|
||||
# Run all tests
|
||||
echo "Running all tests..."
|
||||
go test ./pkg/... -v
|
||||
|
||||
# Run benchmarks if available
|
||||
echo "Running benchmarks..."
|
||||
go test -bench=. -benchmem ./pkg/uniswap/
|
||||
|
||||
# Check for any race conditions
|
||||
echo "Checking for race conditions..."
|
||||
go test -race ./pkg/...
|
||||
|
||||
# Check code coverage
|
||||
echo "Checking code coverage..."
|
||||
go test -coverprofile=coverage.out ./pkg/...
|
||||
go tool cover -func=coverage.out
|
||||
|
||||
# Run static analysis
|
||||
echo "Running static analysis..."
|
||||
golangci-lint run ./cmd/... ./internal/... ./pkg/...
|
||||
|
||||
echo "Analysis complete. Review the output for any errors or warnings."
|
||||
Reference in New Issue
Block a user