-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test windows #356
Merged
Merged
Test windows #356
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
536c776
Run Go build and test on Ubuntu Linux and Windows
09516c1
Remove separate Go build
47d19f3
Propagate errors from test functions
04dc6e8
Merge branch 'master' of github.com:hound-search/hound into test-windows
blobbered 9617631
use new github environment files
blobbered 632a742
use actions/setup-go v2 insetad of v2 beta
blobbered 8d4cb82
test
blobbered 743e1d2
Delete tags file addition
dschott68 1bf0b80
Add --new-from-rev=HEAD~1 to lint to only show new lint errors per ht…
abbec4e
remove changes not related to lint and running on windows
ca54b2c
add make lint
09691d3
use golangci-lint-action
7ccd97f
use nolint on existing codebase lint errors
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ jobs: | |
go: ["1.14", "1.13", "1.12"] | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-go@v2-beta | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- run: go build -x -work ./cmds/... | ||
|
@@ -19,14 +19,28 @@ jobs: | |
with: | ||
node-version: "10.x" | ||
- run: npm install | ||
go-test: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.13" | ||
- run: | | ||
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint | ||
export PATH=$GOPATH/bin:$PATH | ||
golangci-lint run ./... | ||
env: | ||
GOPATH: /tmp/gopath | ||
go-test: | ||
strategy: | ||
matrix: | ||
go: ["1.14", "1.13", "1.12"] | ||
os: [windows-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-go@v2-beta | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- run: go test -race ./... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,7 +220,7 @@ func (ix *IndexWriter) Add(name string, f io.Reader) string { | |
} | ||
|
||
// Flush flushes the index entry to the target file. | ||
func (ix *IndexWriter) Flush() { | ||
func (ix *IndexWriter) Flush() error { | ||
ix.addName("") | ||
|
||
var off [5]uint32 | ||
|
@@ -257,7 +257,7 @@ func (ix *IndexWriter) Flush() { | |
|
||
log.Printf("%d data bytes, %d index bytes", ix.totalBytes, ix.main.offset()) | ||
|
||
ix.main.flush() | ||
return ix.main.flush() | ||
} | ||
|
||
func (ix *IndexWriter) Close() { | ||
|
@@ -563,15 +563,16 @@ func (b *bufWriter) offset() uint32 { | |
return uint32(off) | ||
} | ||
|
||
func (b *bufWriter) flush() { | ||
func (b *bufWriter) flush() error { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
if len(b.buf) == 0 { | ||
return | ||
return nil | ||
} | ||
_, err := b.file.Write(b.buf) | ||
if err != nil { | ||
log.Fatalf("writing %s: %v", b.name, err) | ||
return fmt.Errorf("writing %s: %s", b.name, err) | ||
} | ||
b.buf = b.buf[:0] | ||
return nil | ||
} | ||
|
||
// finish flushes the file to disk and returns an open file ready for reading. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since lint is only for ubuntu and not windows, did you want it in this PR or did you want to split it off into separate smaller PR?