Code Monkey home page Code Monkey logo

makefiles's People

Contributors

kamilsk avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

makefiles's Issues

review test-with-coverage

.PHONY: test-with-coverage
test-with-coverage:
	@go test -cover -covermode atomic -coverprofile c.out -race -timeout $(TIMEOUT) $(PACKAGES) | column -t | sort -r

.PHONY: test-with-coverage-report
test-with-coverage-report: test-with-coverage
	@go tool cover -html c.out

remove test-with-coverage-profile

exclude bin dir for todo

$ make todo
./paas/rpcprotocol/rater.go:51: TODO:legacy
./bin/darwin/x86_64/golangci-lint:13933:SkipNow
./bin/darwin/x86_64/golangci-lint:14403:SkipNow
./bin/darwin/x86_64/golangci-lint:17188: TODO: pushState with updated state and read it on page load,
./bin/darwin/x86_64/golangci-lint:17333: TODO: Implement smarter auto-zoom using the viewBox attribute
./bin/darwin/x86_64/golangci-lint:17372: TODO: scale the graph with the viewBox attribute.
./components/makefiles/vendor.mk:20: TODO:.*|SkipNow' . || true

add go mod download

for pre-filling the local cache or to compute the answers for a Go module proxy

new integration test target

test-integration:
	@go test \
		-cover \
		-covermode atomic \
		-race \
		-tags=integration \
		-coverprofile integration.out \
		./... | column -t | sort -r
.PHONY: test-integration

test-integration-report: test-with-coverage
	@go tool cover -html integration.out
.PHONY: test-integration-report

tools-update didn't work properly

at go-service:

$ make update
...
$ git diff tools/go.mod
-       github.com/golangci/golangci-lint v1.37.1
+       github.com/golangci/golangci-lint v1.38.0

but expected

$ make update
...
$ git diff tools/go.mod
-       github.com/golangci/golangci-lint v1.37.1
-       github.com/grpc-ecosystem/grpc-gateway/v2 v2.2.0
+       github.com/golangci/golangci-lint v1.38.0
+       github.com/grpc-ecosystem/grpc-gateway/v2 v2.3.0
-       google.golang.org/protobuf v1.25.0
+       google.golang.org/protobuf v1.25.1-0.20201208041424-160c7477e0e8

so, why it's happening as above?

check target execution possibility

in some cases, I don't want to use tools/etc, but I use a template and it's not ok to adapt it locally.
it will be great to use check before enabling some targets:

ifeq (, wildcard(tools/*))
  target with stub
else
  valid target
endif

candidates:

  • tools
  • dist without goreleaser/godownloader
  • git hooks

use ?= to allow rewrites env vars

GO111MODULE ?= on
GOFLAGS     ?= -mod=vendor
GOPRIVATE   ?= go.octolab.org
GOPROXY     ?= direct
LOCAL       ?= $(MODULE)
MODULE      ?= `GO111MODULE=on go list -m $(GOFLAGS)`
PACKAGES    ?= `GO111MODULE=on go list $(GOFLAGS) ./...
PATHS       ?= $(shell echo $(PACKAGES) | sed -e "s|$(MODULE)/||g" | sed -e "s|$(MODULE)|$(PWD)/*.go|g")
TIMEOUT     ?= 10s

and remove GO111MODULE=on

bug with test-quick

  • SHELL ?= /bin/bash -euo pipefail - pipefail is lost
  • @go test -run ^Fake$$ -tags $(GOTAGS) ./... | grep -v 'no tests to run' works unproperly if go test run on single-package module without errors

make update has a problem with go 1.14

$ make update
flag provided but not defined: -mod
usage: go get [-d] [-t] [-u] [-v] [-insecure] [build flags] [packages]
Run 'go help get' for details.
make: *** [update] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.