Skip to content

Commit

Permalink
Fix lint (#476)
Browse files Browse the repository at this point in the history
Didn't run for some reasons; something with the actions cache:

	/usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/b9a1abd7-273e-449f-b255-5e8e947b3f97/cache.tzst -P -C /home/runner/work/fsnotify/fsnotify
	Error: /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20220412211240-33da011f77ad/windows/race0.go: Cannot open: File exists
	Error: /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20220412211240-33da011f77ad/windows/types_windows.go: Cannot open: File exists

Replace it with staticcheck; which is nicer anyway.
  • Loading branch information
arp242 committed Jul 30, 2022
1 parent 421f529 commit ff39bb4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 49 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
@@ -1,15 +1,11 @@
name: build
on:
push:
pull_request:
name: 'build'
on: ['push', 'pull_request']
jobs:
cross-compile-supported:
cross-compile:
strategy:
fail-fast: false
matrix:
go:
- '1.16'
- '1.18'
go: ['1.16', '1.18']
runs-on: ubuntu-latest
steps:
- name: setup Go
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/lint.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/staticcheck.yml
@@ -0,0 +1,13 @@
name: 'staticcheck'
on: ['push', 'pull_request']
jobs:
staticcheck:
name: 'staticcheck'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: dominikh/staticcheck-action@v1.2.0
with:
version: '2022.1'
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
@@ -1,7 +1,5 @@
name: test
on:
push:
pull_request:
name: 'test'
on: ['push', 'pull_request']
jobs:
test:
strategy:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/vagrant.yml
@@ -1,7 +1,5 @@
name: vagrant
on:
push:
pull_request:
name: 'test'
on: ['push', 'pull_request']
jobs:
test:
strategy:
Expand Down
6 changes: 3 additions & 3 deletions inotify_test.go
Expand Up @@ -132,7 +132,7 @@ func TestInotifyCloseCreate(t *testing.T) {
}
h.Close()
select {
case _ = <-w.Events:
case <-w.Events:
case err := <-w.Errors:
t.Fatalf("Error from watcher: %v", err)
case <-time.After(50 * time.Millisecond):
Expand All @@ -144,7 +144,7 @@ func TestInotifyCloseCreate(t *testing.T) {
// Now we try to swap the file descriptor under its nose.
w.Close()
w, err = NewWatcher()
defer w.Close()
defer func() { _ = w.Close() }()
if err != nil {
t.Fatalf("Failed to create second watcher: %v", err)
}
Expand Down Expand Up @@ -351,7 +351,7 @@ func TestInotifyInnerMapLength(t *testing.T) {
if err != nil {
t.Fatalf("Failed to remove testFile: %v", err)
}
_ = <-w.Events // consume Remove event
<-w.Events // consume Remove event
<-time.After(50 * time.Millisecond) // wait IN_IGNORE propagated

func() {
Expand Down

0 comments on commit ff39bb4

Please sign in to comment.