mirror of
				https://github.com/cheat/cheat.git
				synced 2025-11-04 07:45:28 +01:00 
			
		
		
		
	chore: creates make coverage target
				
					
				
			Creates a `make coverage` target that generates a unit-testing coverage report.
This commit is contained in:
		
							
								
								
									
										7
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
									
									
									
									
								
							@@ -21,6 +21,7 @@ ZIP    := zip -m
 | 
			
		||||
# build flags
 | 
			
		||||
BUILD_FLAGS  := -ldflags="-s -w" -mod vendor -trimpath
 | 
			
		||||
GOBIN        :=
 | 
			
		||||
TMPDIR       := /tmp
 | 
			
		||||
 | 
			
		||||
# release binaries
 | 
			
		||||
releases :=                        \
 | 
			
		||||
@@ -137,6 +138,12 @@ vet:
 | 
			
		||||
test: 
 | 
			
		||||
	$(GO) test ./...
 | 
			
		||||
 | 
			
		||||
## coverage: generates a test coverage report
 | 
			
		||||
.PHONY: coverage
 | 
			
		||||
coverage:
 | 
			
		||||
	$(GO) test ./... -coverprofile=$(TMPDIR)/cheat-coverage.out && \
 | 
			
		||||
	$(GO) tool cover -html=$(TMPDIR)/cheat-coverage.out
 | 
			
		||||
 | 
			
		||||
## check: formats, lints, vets, vendors, and run unit-tests
 | 
			
		||||
.PHONY: check
 | 
			
		||||
check: | vendor fmt lint vet test
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user