testvet A Go static analysis tool that identifies missing test coverage and misplaced test functions in your Go projects. Features Missing Test Detection : Finds functions and methods not called from any test function : Finds functions and methods not called from any test function Low Coverage Detection : Identifies functions with statement coverage below a threshold (uses go test -cover ) : Identifies functions with statement coverage below a threshold (uses ) AST-Based Call Analysis : Analyzes actual function calls in tests, not naming conventions : Analyzes actual function calls in tests, not naming conventions Misplaced Test Detection : Identifies tests that primarily call functions from a different source file : Identifies tests that primarily call functions from a different source file Method Support : Handles methods with receivers, including generics : Handles methods with receivers, including generics Flexible Filtering : Option to exclude private (unexported) functions from analysis : Option to exclude private (unexported) functions from analysis Clean Output: Organized results grouped by file with line numbers Installation go install github.com/LeanerCloud/testvet@latest Or build from source: git clone https://github.com/LeanerCloud/testvet.git cd testvet go build -o testvet . Usage # Analyze current directory (runs go test for coverage data by default) testvet # Analyze a specific directory testvet -dir /path/to/your/project # Exclude private (unexported) functions testvet -dir . -exclude-private # Show verbose output (parse warnings) testvet -dir . -verbose # Show functions with statement coverage below 80% testvet -threshold 80 # Disable coverage filtering (AST-only analysis, faster but less accurate) testvet -use-coverage=false Example Output ================================================================================ GO TEST COVERAGE ANALYSIS ================================================================================ Project: /path/to/your/p...
First seen: 2025-12-04 07:06
Last seen: 2025-12-04 07:06