diff options
-rw-r--r-- | .circleci/config.yml | 14 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/crypto/rand/rand_arc4random.go | 1 | ||||
-rw-r--r-- | src/crypto/rand/rand_urandom.go | 1 | ||||
-rw-r--r-- | src/device/nxp/mimxrt1062_mpu.go | 8 | ||||
-rw-r--r-- | src/internal/fuzz/fuzz.go | 2 | ||||
-rw-r--r-- | src/internal/task/task_none.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_386.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_amd64.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_amd64_windows.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_arm.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_arm64.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_avr.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_cortexm.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_esp32.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_esp8266.go | 1 | ||||
-rw-r--r-- | src/internal/task/task_stack_tinygoriscv.go | 1 | ||||
-rw-r--r-- | src/net/interface_tinygo.go | 1 |
18 files changed, 28 insertions, 12 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index fbdc52c04..3114194fb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,6 +95,14 @@ commands: key: wasi-libc-sysroot-systemclang-v6 paths: - lib/wasi-libc/sysroot + - when: + condition: <<parameters.fmt-check>> + steps: + - run: + # Do this before gen-device so that it doesn't check the + # formatting of generated files. + name: Check Go code formatting + command: make fmt-check - run: make gen-device -j4 - run: make smoketest XTENSA=0 - save_cache: @@ -102,12 +110,6 @@ commands: paths: - ~/.cache/go-build - /go/pkg/mod - - when: - condition: <<parameters.fmt-check>> - steps: - - run: - name: Check Go code formatting - command: make fmt-check jobs: test-llvm13-go116: @@ -150,7 +150,7 @@ endif clean: @rm -rf build -FMT_PATHS = ./*.go builder cgo compiler interp loader src/device/arm src/examples src/machine src/os src/reflect src/runtime src/sync src/syscall src/testing src/internal/reflectlite transform +FMT_PATHS = ./*.go builder cgo/*.go compiler interp loader src transform fmt: @gofmt -l -w $(FMT_PATHS) fmt-check: diff --git a/src/crypto/rand/rand_arc4random.go b/src/crypto/rand/rand_arc4random.go index 9d28e63f4..8bfcbe872 100644 --- a/src/crypto/rand/rand_arc4random.go +++ b/src/crypto/rand/rand_arc4random.go @@ -1,3 +1,4 @@ +//go:build darwin || tinygo.wasm // +build darwin tinygo.wasm // This implementation of crypto/rand uses the arc4random_buf function diff --git a/src/crypto/rand/rand_urandom.go b/src/crypto/rand/rand_urandom.go index 64388de7c..78d1a9e99 100644 --- a/src/crypto/rand/rand_urandom.go +++ b/src/crypto/rand/rand_urandom.go @@ -1,3 +1,4 @@ +//go:build linux && !baremetal && !wasi // +build linux,!baremetal,!wasi // This implementation of crypto/rand uses the /dev/urandom pseudo-file to diff --git a/src/device/nxp/mimxrt1062_mpu.go b/src/device/nxp/mimxrt1062_mpu.go index 9f3b5a20d..91c867db4 100644 --- a/src/device/nxp/mimxrt1062_mpu.go +++ b/src/device/nxp/mimxrt1062_mpu.go @@ -193,12 +193,12 @@ func enableIcache(enable bool) { arm.Asm("dsb 0xF") arm.Asm("isb 0xF") } else { - arm.Asm("dsb 0xF") - arm.Asm("isb 0xF") + arm.Asm("dsb 0xF") + arm.Asm("isb 0xF") SystemControl.CCR.ClearBits(SCB_CCR_IC_Msk) SystemControl.ICIALLU.Set(0) - arm.Asm("dsb 0xF") - arm.Asm("isb 0xF") + arm.Asm("dsb 0xF") + arm.Asm("isb 0xF") } } } diff --git a/src/internal/fuzz/fuzz.go b/src/internal/fuzz/fuzz.go index ee6e0544b..cd525076d 100644 --- a/src/internal/fuzz/fuzz.go +++ b/src/internal/fuzz/fuzz.go @@ -115,7 +115,7 @@ func CheckCorpus(vals []any, types []reflect.Type) error { return errors.New("not implemented") } -func ResetCoverage() {} +func ResetCoverage() {} func SnapshotCoverage() {} // RunFuzzWorker is called in a worker process to communicate with the diff --git a/src/internal/task/task_none.go b/src/internal/task/task_none.go index 40420f022..19dbee624 100644 --- a/src/internal/task/task_none.go +++ b/src/internal/task/task_none.go @@ -1,3 +1,4 @@ +//go:build scheduler.none // +build scheduler.none package task diff --git a/src/internal/task/task_stack_386.go b/src/internal/task/task_stack_386.go index c0f066594..10744757a 100644 --- a/src/internal/task/task_stack_386.go +++ b/src/internal/task/task_stack_386.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && 386 // +build scheduler.tasks,386 package task diff --git a/src/internal/task/task_stack_amd64.go b/src/internal/task/task_stack_amd64.go index f8d557816..b39189316 100644 --- a/src/internal/task/task_stack_amd64.go +++ b/src/internal/task/task_stack_amd64.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && amd64 && !windows // +build scheduler.tasks,amd64,!windows package task diff --git a/src/internal/task/task_stack_amd64_windows.go b/src/internal/task/task_stack_amd64_windows.go index e5ee47eb5..41ddbe6c9 100644 --- a/src/internal/task/task_stack_amd64_windows.go +++ b/src/internal/task/task_stack_amd64_windows.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && amd64 && windows // +build scheduler.tasks,amd64,windows package task diff --git a/src/internal/task/task_stack_arm.go b/src/internal/task/task_stack_arm.go index 5934f0284..18982e875 100644 --- a/src/internal/task/task_stack_arm.go +++ b/src/internal/task/task_stack_arm.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && arm && !cortexm && !avr && !xtensa && !tinygo.riscv // +build scheduler.tasks,arm,!cortexm,!avr,!xtensa,!tinygo.riscv package task diff --git a/src/internal/task/task_stack_arm64.go b/src/internal/task/task_stack_arm64.go index d65c30c49..e4fd09b20 100644 --- a/src/internal/task/task_stack_arm64.go +++ b/src/internal/task/task_stack_arm64.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && arm64 // +build scheduler.tasks,arm64 package task diff --git a/src/internal/task/task_stack_avr.go b/src/internal/task/task_stack_avr.go index 655280acb..96b7034d9 100644 --- a/src/internal/task/task_stack_avr.go +++ b/src/internal/task/task_stack_avr.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && avr // +build scheduler.tasks,avr package task diff --git a/src/internal/task/task_stack_cortexm.go b/src/internal/task/task_stack_cortexm.go index 1d9969796..f61688808 100644 --- a/src/internal/task/task_stack_cortexm.go +++ b/src/internal/task/task_stack_cortexm.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && cortexm // +build scheduler.tasks,cortexm package task diff --git a/src/internal/task/task_stack_esp32.go b/src/internal/task/task_stack_esp32.go index ee1046b05..a76688447 100644 --- a/src/internal/task/task_stack_esp32.go +++ b/src/internal/task/task_stack_esp32.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && esp32 // +build scheduler.tasks,esp32 package task diff --git a/src/internal/task/task_stack_esp8266.go b/src/internal/task/task_stack_esp8266.go index 5c9442f57..4a01a6fff 100644 --- a/src/internal/task/task_stack_esp8266.go +++ b/src/internal/task/task_stack_esp8266.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && esp8266 // +build scheduler.tasks,esp8266 package task diff --git a/src/internal/task/task_stack_tinygoriscv.go b/src/internal/task/task_stack_tinygoriscv.go index 6f20eebf1..36ef742e2 100644 --- a/src/internal/task/task_stack_tinygoriscv.go +++ b/src/internal/task/task_stack_tinygoriscv.go @@ -1,3 +1,4 @@ +//go:build scheduler.tasks && tinygo.riscv // +build scheduler.tasks,tinygo.riscv package task diff --git a/src/net/interface_tinygo.go b/src/net/interface_tinygo.go index fbf7ee988..30eea3f44 100644 --- a/src/net/interface_tinygo.go +++ b/src/net/interface_tinygo.go @@ -1,3 +1,4 @@ +//go:build tinygo // +build tinygo package net |