Skip to content

Commit

Permalink
make spellfix: fix top level files, too.
Browse files Browse the repository at this point in the history
Do manual fix in GNUmakefile, since spellchecking that is just too meta.
  • Loading branch information
dkegel-fastly authored and deadprogram committed Aug 15, 2024
1 parent 5d82a7e commit d3e67cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ endif
# compress/flate appears to hang on wasi
# crypto/hmac fails on wasi, it exits with a "slice out of range" panic
# debug/plan9obj requires os.ReadAt, which is not yet supported on windows
# image requires recover(), which is not yet supported on wasi
# image requires recover(), which is not yet supported on wasi
# io/ioutil requires os.ReadDir, which is not yet supported on windows or wasi
# mime/quotedprintable requires syscall.Faccessat
# strconv requires recover() which is not yet supported on wasi
# text/tabwriter requries recover(), which is not yet supported on wasi
# text/tabwriter requires recover(), which is not yet supported on wasi
# text/template/parse requires recover(), which is not yet supported on wasi
# testing/fstest requires os.ReadDir, which is not yet supported on windows or wasi

Expand Down Expand Up @@ -963,11 +963,11 @@ lint: tools ## Lint source tree
SPELLDIRSCMD=find . -depth 1 -type d | egrep -wv '.git|lib|llvm|src'; find src -depth 1 | egrep -wv 'device|internal|net|vendor'; find src/internal -depth 1 -type d | egrep -wv src/internal/wasi
.PHONY: spell
spell: tools ## Spellcheck source tree
misspell -error --dict misspell.csv -i 'ackward,devided,extint,rela' $$( $(SPELLDIRSCMD) ) *.md
misspell -error --dict misspell.csv -i 'ackward,devided,extint,rela' $$( $(SPELLDIRSCMD) ) *.go *.md

.PHONY: spellfix
spellfix: tools ## Same as spell, but fixes what it finds
misspell -w --dict misspell.csv -i 'ackward,devided,extint,rela' $$( $(SPELLDIRSCMD) ) *.md
misspell -w --dict misspell.csv -i 'ackward,devided,extint,rela' $$( $(SPELLDIRSCMD) ) *.go *.md

# https://www.client9.com/self-documenting-makefiles/
.PHONY: help
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ func Run(pkgName string, options *compileopts.Options, cmdArgs []string) error {

// buildAndRun builds and runs the given program, writing output to stdout and
// errors to os.Stderr. It takes care of emulators (qemu, wasmtime, etc) and
// passes command line arguments and evironment variables in a way appropriate
// passes command line arguments and environment variables in a way appropriate
// for the given emulator.
func buildAndRun(pkgName string, config *compileopts.Config, stdout io.Writer, cmdArgs, environmentVars []string, timeout time.Duration, run func(cmd *exec.Cmd, result builder.BuildResult) error) (builder.BuildResult, error) {

Expand Down Expand Up @@ -1631,7 +1631,7 @@ func main() {
for i := range bufs {
err := bufs[i].flush(os.Stdout, os.Stderr)
if err != nil {
// There was an error writing to stdout or stderr, so we probbably cannot print this.
// There was an error writing to stdout or stderr, so we probably cannot print this.
select {
case fail <- struct{}{}:
default:
Expand Down
1 change: 1 addition & 0 deletions misspell.csv
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ orignal,original
overrided,overridden
poiners,pointers
poitner,pointer
probbably,probably
recogized,recognized
refection,reflection
requries,requires
Expand Down

0 comments on commit d3e67cf

Please sign in to comment.