<commit_before>UNAME := $(shell uname)

ifeq ($(UNAME),Linux)
	SED_CMD=sed -i -e
endif

ifeq ($(UNAME),Darwin)
	SED_CMD=sed -i '' -e
endif

.PHONY: test
test:
	go test -v ./...

.PHONY: generate-fakes
generate-fakes:
	go generate ./...

	# AWS fakes
	counterfeiter -o fakes/fake_elasticacheiface_client.go \
		vendor/github.com/aws/aws-sdk-go/service/elasticache/elasticacheiface/interface.go ElastiCacheAPI

	counterfeiter -o fakes/fake_cloudfront_client.go \
		vendor/github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface/interface.go CloudFrontAPI

	counterfeiter -o fakes/fake_s3_client.go \
		vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go S3API

	counterfeiter -o fakes/fake_cloudwatch_client.go \
		vendor/github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface/interface.go CloudWatchAPI

	# Project fakes
	counterfeiter -o service_fakes/fake_cloudfront_service.go \
		cloudfront.go CloudFrontServiceInterface

	$(SED_CMD) "s|github.com/alphagov/paas-cf/tools/metrics/vendor/||" fakes/fake_*.go
	$(SED_CMD) "s|github.com/alphagov/paas-cf/tools/metrics/vendor/||" service_fakes/fake_*.go
<commit_msg>Remove unused CloudFrontServiceInterface fake<commit_after>UNAME := $(shell uname)

ifeq ($(UNAME),Linux)
	SED_CMD=sed -i -e
endif

ifeq ($(UNAME),Darwin)
	SED_CMD=sed -i '' -e
endif

.PHONY: test
test:
	go test -v ./...

.PHONY: generate-fakes
generate-fakes:
	go generate ./...

	# AWS fakes
	counterfeiter -o fakes/fake_elasticacheiface_client.go \
		vendor/github.com/aws/aws-sdk-go/service/elasticache/elasticacheiface/interface.go ElastiCacheAPI

	counterfeiter -o fakes/fake_cloudfront_client.go \
		vendor/github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface/interface.go CloudFrontAPI

	counterfeiter -o fakes/fake_s3_client.go \
		vendor/github.com/aws/aws-sdk-go/service/s3/s3iface/interface.go S3API

	counterfeiter -o fakes/fake_cloudwatch_client.go \
		vendor/github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface/interface.go CloudWatchAPI

	$(SED_CMD) "s|github.com/alphagov/paas-cf/tools/metrics/vendor/||" fakes/fake_*.go
	$(SED_CMD) "s|github.com/alphagov/paas-cf/tools/metrics/vendor/||" service_fakes/fake_*.go

{'fraction_non_alphanumeric': 0.13644688644688643, 'fraction_numerical': 0.003663003663003663, 'mean_word_length': 4.421836228287841, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6401282', 'n_tokens_mistral': 866, 'n_tokens_neox': 847, 'n_words': 118}