Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
timeout-minutes: 5
runs-on: fedora-41
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: extractions/setup-just@v2
- uses: actions/setup-go@v5
- uses: actions/setup-go@v6
with:
cache: false
go-version-file: go.mod
Expand All @@ -24,4 +24,4 @@ jobs:
just sysinfo
- name: Run Go Test
run: |
just init tidy lint test
just init tidy lint tests
89 changes: 44 additions & 45 deletions .github/workflows/scripts/golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,46 @@
run:
timeout: 5m
version: "2"
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- dogsled
- dupword
- durationcheck
- errcheck
- errname
- errorlint
- exhaustive
- gochecknoinits
- gocritic
- gofmt
- gosimple
- govet
- ineffassign
- makezero
- misspell
- musttag
- nilnil
- noctx
- paralleltest
- perfsprint
- prealloc
- predeclared
- reassign
- revive
- rowserrcheck
- staticcheck
- sqlclosecheck
- tagalign
- tenv
- unused
- whitespace

linters-settings:
paralleltest:
ignore-missing-subtests: true
exhaustive:
default-signifies-exhaustive: true

- asasalint
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- dogsled
- dupword
- durationcheck
- errname
- errorlint
- exhaustive
- gochecknoinits
- gocritic
- makezero
- misspell
- musttag
- nilnil
- noctx
- paralleltest
- perfsprint
- prealloc
- predeclared
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- tagalign
- usetesting
- whitespace
settings:
exhaustive:
default-signifies-exhaustive: true
paralleltest:
ignore-missing-subtests: true
exclusions:
generated: lax
presets:
- comments
formatters:
enable:
- gofmt
exclusions:
generated: lax
6 changes: 3 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ vet:
go vet ./...

# run go test on the source tree
test:
tests:
go test -race ./...

# lint the nerfs-compile source tree
lint: vet
$GOBIN/golangci-lint --config $scripts/golangci.yaml run
$GOBIN/golangci-lint run --config $scripts/golangci.yaml

# show host system information
@sysinfo:
echo "{{os()/arch()}} {{num_cpus()}}c"

# locally install build dependencies
init:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4
2 changes: 1 addition & 1 deletion cmds/nerfs-builds/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"os"
"path/filepath"

"cattlecloud.net/go/babycli"
"cattlecloud.net/nerfs"
"cattlecloud.net/nerfs/cmds/nerfs-builds/domains"
"cattlecloud.net/nerfs/cmds/nerfs-builds/wordlist"
"noxide.lol/go/babycli"
)

func Invoke(args []string) babycli.Code {
Expand Down
4 changes: 2 additions & 2 deletions cmds/nerfs-builds/domains/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"path/filepath"
"time"

"noxide.lol/go/atomicfs"
"noxide.lol/go/ulog"
"cattlecloud.net/go/atomicfs"
"cattlecloud.net/go/ulog"
)

var sources = []string{
Expand Down
6 changes: 3 additions & 3 deletions cmds/nerfs-builds/domains/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"time"

"noxide.lol/go/ulog"
"noxide.lol/go/xtc"
"cattlecloud.net/go/scope"
"cattlecloud.net/go/ulog"
)

// Source contains a URI from which we can acquire a set of unwanted domains.
Expand All @@ -27,7 +27,7 @@ func NewSource(url string) *Source {
}

func (s *Source) Get(a *Artifact) error {
ctx, cancel := xtc.TTL(30 * time.Second)
ctx, cancel := scope.TTL(30 * time.Second)
defer cancel()

request, rerr := http.NewRequestWithContext(ctx, http.MethodGet, s.url, nil)
Expand Down
2 changes: 1 addition & 1 deletion cmds/nerfs-builds/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

"cattlecloud.net/go/babycli"
"cattlecloud.net/nerfs/cmds/nerfs-builds/commands"
"noxide.lol/go/babycli"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmds/nerfs-builds/wordlist/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"time"

"noxide.lol/go/atomicfs"
"noxide.lol/go/ulog"
"cattlecloud.net/go/atomicfs"
"cattlecloud.net/go/ulog"
)

type Builder struct {
Expand Down
18 changes: 9 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module cattlecloud.net/nerfs

go 1.23
go 1.26

require (
github.com/hashicorp/go-set/v3 v3.0.0
github.com/shoenig/test v1.12.0
noxide.lol/go/atomicfs v1.0.0
noxide.lol/go/babycli v0.1.4
noxide.lol/go/ulog v0.1.0
noxide.lol/go/xtc v0.2.0
cattlecloud.net/go/atomicfs v1.1.2
cattlecloud.net/go/babycli v0.2.0
cattlecloud.net/go/scope v1.3.0
cattlecloud.net/go/ulog v1.1.3
github.com/hashicorp/go-set/v3 v3.0.1
github.com/shoenig/test v1.13.2
)

require (
github.com/google/go-cmp v0.6.0 // indirect
noxide.lol/go/stacks v1.0.0 // indirect
cattlecloud.net/go/stacks v1.1.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
)
32 changes: 16 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hashicorp/go-set/v3 v3.0.0 h1:CaJBQvQCOWoftrBcDt7Nwgo0kdpmrKxar/x2o6pV9JA=
github.com/hashicorp/go-set/v3 v3.0.0/go.mod h1:IEghM2MpE5IaNvL+D7X480dfNtxjRXZ6VMpK3C8s2ok=
github.com/shoenig/test v1.12.0 h1:5gu0WaxkayLUad6B/VCnBWMi5VR7oVYCw/d34SU1ed0=
github.com/shoenig/test v1.12.0/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI=
noxide.lol/go/atomicfs v1.0.0 h1:NSlmJx1rMZVO2g+ytcWS2s1ptbJGvykC4vWANfKGdjY=
noxide.lol/go/atomicfs v1.0.0/go.mod h1:eaaNQy8PMvKTxpqGMC3xk61nx2++wXYFwGTGSeoMWpI=
noxide.lol/go/babycli v0.1.4 h1:gdgpLn1ydzy7VK3ZQAIbHnnPk1yHfyd6OYLo9UsWulY=
noxide.lol/go/babycli v0.1.4/go.mod h1:WatWwUui1Zf1KtSz4EzLtOkGkljrhOFfXfLHVoBRDj4=
noxide.lol/go/stacks v1.0.0 h1:g4MPkizQF/6B3u1ejGxWDIjL1zM/MSHMzoS1DEZTOWY=
noxide.lol/go/stacks v1.0.0/go.mod h1:rwC8UA5l8uwwfRNAKuBSI+7hpP8ilJVK3gozAn7vjzM=
noxide.lol/go/ulog v0.1.0 h1:NBvk+apaBnDuohHvX32V97FvVa5tCbWDHWdeh72BHv0=
noxide.lol/go/ulog v0.1.0/go.mod h1:ikJUzYrOlH8SlSnV29eg7j5QdLvAZf4jxi3NJigTO0k=
noxide.lol/go/xtc v0.2.0 h1:KxgaQ28Moc4T0O22wuj3698rhB0srAWoTpAhtgp4DXA=
noxide.lol/go/xtc v0.2.0/go.mod h1:WaIsAXK/e1jY8EP00bXYoUAxGS4Jevbwc2JnKeyt5F8=
cattlecloud.net/go/atomicfs v1.1.2 h1:Wo6BwWm9QZuYl4eFTaFMGKD0Ai/gXZb3swCwsbUWiI8=
cattlecloud.net/go/atomicfs v1.1.2/go.mod h1:QwZSzPIIS5uLbAQ22cn0LidQoJLRyjcgMse3DpZGH+8=
cattlecloud.net/go/babycli v0.2.0 h1:niw4uPiFQT7bekq8OJ3LoiIsz2B7L6EZcO+esMx9AP0=
cattlecloud.net/go/babycli v0.2.0/go.mod h1:IhC9GNNMMlDr5sx/lMFBDa1d7jvkI1sluTPsKbpvoAU=
cattlecloud.net/go/scope v1.3.0 h1:mtcE3vo9aB0tQK60CKzxysNAXhfqsTfrc2R+yi9q+Wc=
cattlecloud.net/go/scope v1.3.0/go.mod h1:s4E3A9aWEhVoUrPXBZEgr35m2SyAuk89MNTOsea+a5o=
cattlecloud.net/go/stacks v1.1.0 h1:uXnOnluwPT+3IfRDzTmkEP8RCfToBeNremjahViWUhY=
cattlecloud.net/go/stacks v1.1.0/go.mod h1:BD7LcLq19hHEyA+oQOrInqmjjiCccCcVTIxt8eEmW4M=
cattlecloud.net/go/ulog v1.1.3 h1:MF5OKiAny2p7wrmDMDi5C0+rGUipxozELbsjXYbPLnI=
cattlecloud.net/go/ulog v1.1.3/go.mod h1:Dojc/73slqtZOAm7bvLDhi+X42hXtAqSqCYj+Xd2c64=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/hashicorp/go-set/v3 v3.0.1 h1:ZwO15ZYmIrFYL9zSm2wBuwcRiHxVdp46m/XA/MUlM6I=
github.com/hashicorp/go-set/v3 v3.0.1/go.mod h1:0oPQqhtitglZeT2ZiWnRIfUG6gJAHnn7LzrS7SbgNY4=
github.com/shoenig/test v1.13.2 h1:SaGxHxg7xkRuKuNtuFmHf0LgNGaAgcBT7HN4WHCKfqU=
github.com/shoenig/test v1.13.2/go.mod h1:MKmiRyEeuFl8y9PCoThaRDgYQZeWBhRQlH99poXz5LI=