|
1 | | - |
2 | 1 | clean: |
3 | 2 | @rm -rf build |
4 | 3 |
|
@@ -26,3 +25,29 @@ unit-test: |
26 | 25 | @go test -v $(addprefix ./,$(TESTS)) |
27 | 26 |
|
28 | 27 | test: clean fmt-check unit-test smoke-test |
| 28 | + |
| 29 | +fmt_quick_check: |
| 30 | + @# a very fast check before build, but depends on accessibility of all imports |
| 31 | + @# switch off the "stdmethods" analyzer is needed due to finding: |
| 32 | + @# at24cx/at24cx.go:57:18: method WriteByte(eepromAddress uint16, value uint8) error should have signature WriteByte(byte) error |
| 33 | + @# at24cx/at24cx.go:67:18: method ReadByte(eepromAddress uint16) (uint8, error) should have signature ReadByte() (byte, error) |
| 34 | + @# switch off the "shift" analyzer is needed due to finding: |
| 35 | + @#tmc5160/registers.go:1939:16: m.CUR_A (16 bits) too small for shift of 16 |
| 36 | + @#tmc5160/registers.go:1996:16: m.X3 (8 bits) too small for shift of 27 |
| 37 | + @#tmc5160/registers.go:1996:27: m.X2 (8 bits) too small for shift of 24 |
| 38 | + @#tmc5160/registers.go:1996:38: m.X1 (8 bits) too small for shift of 21 |
| 39 | + @#tmc5160/registers.go:1996:49: m.W3 (8 bits) too small for shift of 18 |
| 40 | + @#tmc5160/registers.go:1996:60: m.W2 (8 bits) too small for shift of 16 |
| 41 | + @#tmc5160/registers.go:1996:71: m.W1 (8 bits) too small for shift of 14 |
| 42 | + @#tmc5160/registers.go:1996:82: m.W0 (8 bits) too small for shift of 12 |
| 43 | + go vet -tags lint -stdmethods=false -shift=false ./... |
| 44 | + |
| 45 | +fmt_check: |
| 46 | + @# a complete format check, but depends on accessibility of all imports |
| 47 | + golangci-lint -v run --build-tags=lint |
| 48 | + |
| 49 | +fmt_fix: |
| 50 | + @# an automatic reformat and complete format check, but depends on accessibility of all imports |
| 51 | + @#TODO: activate when ready |
| 52 | + @#gofumpt -l -w ./... |
| 53 | + golangci-lint -v run --build-tags=lint --fix |
0 commit comments