Skip to content

Commit

Permalink
docs: Clean up make docs on windows (influxdata#12796)
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj authored Mar 7, 2023
1 parent 2b6d9f2 commit 5b27866
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ README.md merge=union
go.sum merge=union
plugins/inputs/all/all.go merge=union
plugins/outputs/all/all.go merge=union
**/testdata/** test eol=lf

# Always check-out / check-in files with LF line endings.
* text=auto eol=lf
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ build_tools:
$(HOSTGO) build -o ./tools/readme_linter/readme_linter$(EXEEXT) ./tools/readme_linter

embed_readme_%:
GOOS=linux go generate -run="readme_config_includer/generator$$" ./plugins/$*/...
GOOS=windows go generate -run="readme_config_includer/generator$$" ./plugins/$*/...
GOOS=darwin go generate -run="readme_config_includer/generator$$" ./plugins/$*/...
go generate -run="readme_config_includer/generator$$" ./plugins/$*/...

.PHONY: config
config:
Expand Down
4 changes: 4 additions & 0 deletions plugins/serializers/csv/csv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ func TestSerializeTransformationNonBatch(t *testing.T) {
// Serialize
serializer, err := NewSerializer(cfg.TimestampFormat, cfg.Separator, cfg.Header, cfg.Prefix)
require.NoError(t, err)
// expected results use LF endings
serializer.writer.UseCRLF = false
var actual bytes.Buffer
for _, m := range metrics {
buf, err := serializer.Serialize(m)
Expand Down Expand Up @@ -149,6 +151,8 @@ func TestSerializeTransformationBatch(t *testing.T) {
// Serialize
serializer, err := NewSerializer(cfg.TimestampFormat, cfg.Separator, cfg.Header, cfg.Prefix)
require.NoError(t, err)
// expected results use LF endings
serializer.writer.UseCRLF = false
actual, err := serializer.SerializeBatch(metrics)
require.NoError(t, err)

Expand Down
3 changes: 2 additions & 1 deletion tools/readme_config_includer/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func extractIncludeBlock(txt []byte, includesEx *regexp.Regexp, root string) *in
}
include := filepath.FromSlash(string(inc[1]))
// Make absolute paths relative to the include-root if any
if filepath.IsAbs(include) {
// Check original value to avoid platform specific slashes
if filepath.IsAbs(string(inc[1])) {
if root == "" {
log.Printf("Ignoring absolute include %q without include root...", include)
continue
Expand Down

0 comments on commit 5b27866

Please sign in to comment.