all: run gofmt on all source code
Some source code wasn't part of `FMT_PATHS` so wasn't checked for correct formatting. This change includes all this source code and excludes cgo/testdata because it contains files that can't be parsed.
Этот коммит содержится в:
родитель
9af535bf98
коммит
64d7f1e436
18 изменённых файлов: 28 добавлений и 12 удалений
|
@ -95,6 +95,14 @@ commands:
|
||||||
key: wasi-libc-sysroot-systemclang-v6
|
key: wasi-libc-sysroot-systemclang-v6
|
||||||
paths:
|
paths:
|
||||||
- lib/wasi-libc/sysroot
|
- 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 gen-device -j4
|
||||||
- run: make smoketest XTENSA=0
|
- run: make smoketest XTENSA=0
|
||||||
- save_cache:
|
- save_cache:
|
||||||
|
@ -102,12 +110,6 @@ commands:
|
||||||
paths:
|
paths:
|
||||||
- ~/.cache/go-build
|
- ~/.cache/go-build
|
||||||
- /go/pkg/mod
|
- /go/pkg/mod
|
||||||
- when:
|
|
||||||
condition: <<parameters.fmt-check>>
|
|
||||||
steps:
|
|
||||||
- run:
|
|
||||||
name: Check Go code formatting
|
|
||||||
command: make fmt-check
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-llvm13-go116:
|
test-llvm13-go116:
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -150,7 +150,7 @@ endif
|
||||||
clean:
|
clean:
|
||||||
@rm -rf build
|
@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:
|
fmt:
|
||||||
@gofmt -l -w $(FMT_PATHS)
|
@gofmt -l -w $(FMT_PATHS)
|
||||||
fmt-check:
|
fmt-check:
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build darwin || tinygo.wasm
|
||||||
// +build darwin tinygo.wasm
|
// +build darwin tinygo.wasm
|
||||||
|
|
||||||
// This implementation of crypto/rand uses the arc4random_buf function
|
// This implementation of crypto/rand uses the arc4random_buf function
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux && !baremetal && !wasi
|
||||||
// +build linux,!baremetal,!wasi
|
// +build linux,!baremetal,!wasi
|
||||||
|
|
||||||
// This implementation of crypto/rand uses the /dev/urandom pseudo-file to
|
// This implementation of crypto/rand uses the /dev/urandom pseudo-file to
|
||||||
|
|
|
@ -193,12 +193,12 @@ func enableIcache(enable bool) {
|
||||||
arm.Asm("dsb 0xF")
|
arm.Asm("dsb 0xF")
|
||||||
arm.Asm("isb 0xF")
|
arm.Asm("isb 0xF")
|
||||||
} else {
|
} else {
|
||||||
arm.Asm("dsb 0xF")
|
arm.Asm("dsb 0xF")
|
||||||
arm.Asm("isb 0xF")
|
arm.Asm("isb 0xF")
|
||||||
SystemControl.CCR.ClearBits(SCB_CCR_IC_Msk)
|
SystemControl.CCR.ClearBits(SCB_CCR_IC_Msk)
|
||||||
SystemControl.ICIALLU.Set(0)
|
SystemControl.ICIALLU.Set(0)
|
||||||
arm.Asm("dsb 0xF")
|
arm.Asm("dsb 0xF")
|
||||||
arm.Asm("isb 0xF")
|
arm.Asm("isb 0xF")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ func CheckCorpus(vals []any, types []reflect.Type) error {
|
||||||
return errors.New("not implemented")
|
return errors.New("not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
func ResetCoverage() {}
|
func ResetCoverage() {}
|
||||||
func SnapshotCoverage() {}
|
func SnapshotCoverage() {}
|
||||||
|
|
||||||
// RunFuzzWorker is called in a worker process to communicate with the
|
// RunFuzzWorker is called in a worker process to communicate with the
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.none
|
||||||
// +build scheduler.none
|
// +build scheduler.none
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && 386
|
||||||
// +build scheduler.tasks,386
|
// +build scheduler.tasks,386
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && amd64 && !windows
|
||||||
// +build scheduler.tasks,amd64,!windows
|
// +build scheduler.tasks,amd64,!windows
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && amd64 && windows
|
||||||
// +build scheduler.tasks,amd64,windows
|
// +build scheduler.tasks,amd64,windows
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && arm && !cortexm && !avr && !xtensa && !tinygo.riscv
|
||||||
// +build scheduler.tasks,arm,!cortexm,!avr,!xtensa,!tinygo.riscv
|
// +build scheduler.tasks,arm,!cortexm,!avr,!xtensa,!tinygo.riscv
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && arm64
|
||||||
// +build scheduler.tasks,arm64
|
// +build scheduler.tasks,arm64
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && avr
|
||||||
// +build scheduler.tasks,avr
|
// +build scheduler.tasks,avr
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && cortexm
|
||||||
// +build scheduler.tasks,cortexm
|
// +build scheduler.tasks,cortexm
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && esp32
|
||||||
// +build scheduler.tasks,esp32
|
// +build scheduler.tasks,esp32
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && esp8266
|
||||||
// +build scheduler.tasks,esp8266
|
// +build scheduler.tasks,esp8266
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build scheduler.tasks && tinygo.riscv
|
||||||
// +build scheduler.tasks,tinygo.riscv
|
// +build scheduler.tasks,tinygo.riscv
|
||||||
|
|
||||||
package task
|
package task
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build tinygo
|
||||||
// +build tinygo
|
// +build tinygo
|
||||||
|
|
||||||
package net
|
package net
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче