Skip to content

Commit

Permalink
add .gitattributes
Browse files Browse the repository at this point in the history
  • Loading branch information
muir committed Sep 25, 2022
1 parent 9175a11 commit 2444445
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*.zzzgo linguist-language=Go
doc.go linguist-documentation
*.md linguist-documentation
basegroup.go linguist-generated
line.go linguist-generated
seed.go linguist-generated
span.go linguist-generated
sub.go linguist-generated
internal/enumer_test.go linguist-generated
trace/hexbytes.go linguist-generated
xopat/attributes.go linguist-generated
xopbase/base.go linguist-generated
xopjson/attributes.go linguist-generated
xopjson/jsonlogger.go linguist-generated
xopotel/otel.go linguist-generated
xoptest/testlogger.go linguist-generated
xoputil/skip.go linguist-generated
xoptest/xoptestutil/enums.go linguist-generated
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ ZZZGENERATED = $(patsubst %.zzzgo, %.go, $(ZZZGO))
TOOLS = ${GOBIN}/gofumpt ${GOBIN}/goimports ${GOBIN}/enumer
TEST_ONLY =?

all: $(ZZZGENERATED)
all: $(ZZZGENERATED) .gitattributes
go generate ./...
go build ./...

.gitattributes: $(ZZZGENERATED)
echo '*.zzzgo linguist-language=Go' > $@
echo 'doc.go linguist-documentation' >> $@
echo '*.md linguist-documentation' >> $@
for i in $(ZZZGENERATED); do echo "$$i linguist-generated" >> $@; done

test: $(ZZZGENERATED) testadjuster
go generate ./...
go test -v ./xopjson/... -run TestASingleLine
Expand Down Expand Up @@ -87,4 +93,3 @@ OTEL_TAG="v1.12.0"

otel-generate: ../opentelemetry-specification ../opentelemetry-go
cd ../opentelemetry-specification && git pull && git checkout tags/$(OTEL_TAG)

1 change: 1 addition & 0 deletions line.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions line.zzzgo
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ func (line *Line) Any(k string, v interface{}) *Line {
return line
}

// TODO: func (l *Log) Guage(name string, value float64, )
// TODO: func (l *Log) AdjustCounter(name string, value float64, )
// TODO: func (l *Log) Event

func (line *Line) Float32(k string, v float32) *Line {
line.line.Float64(k, float64(v), xopbase.Float32DataType)
return line
Expand Down

0 comments on commit 2444445

Please sign in to comment.