Open-CMSIS-Pack / generator-bridge

Reference examples of a generator bridge. E.g. STCubeMX_Bridge
Apache License 2.0
2 stars 6 forks source link

Initial playground #2

Closed thorstendb-ARM closed 1 year ago

thorstendb-ARM commented 1 year ago

Start of project https://github.com/Open-CMSIS-Pack/generator-bridge/issues/7

github-actions[bot] commented 1 year ago

Test Results

  6 files  ±  0  48 suites  +42   3s :stopwatch: +3s 11 tests +  9  11 :heavy_check_mark: +  9  0 :zzz: ±0  0 :x: ±0  66 runs  +54  66 :heavy_check_mark: +54  0 :zzz: ±0  0 :x: ±0 

Results for commit ba7de177. ± Comparison against base commit 4df6a294.

This pull request removes 2 and adds 11 tests. Note that renamed tests count towards both. ``` cmd/cmd ‑ Test_main cmd/cmd ‑ Test_main/dummy_main_test ``` ``` github.com/open-cmsis-pack/generator-bridge/cmd ‑ Test_main github.com/open-cmsis-pack/generator-bridge/cmd ‑ Test_main/dummy_main_test github.com/open-cmsis-pack/generator-bridge/internal/common ‑ TestFoo github.com/open-cmsis-pack/generator-bridge/internal/readFile ‑ TestReader github.com/open-cmsis-pack/generator-bridge/internal/stm32CubeMX ‑ TestIniReader github.com/open-cmsis-pack/generator-bridge/internal/stm32CubeMX ‑ TestSTM32CubeMX_ github.com/open-cmsis-pack/generator-bridge/internal/utils ‑ TestAddLine github.com/open-cmsis-pack/generator-bridge/internal/utils ‑ TestAddQuotes github.com/open-cmsis-pack/generator-bridge/internal/utils ‑ TestStartSignalWatcher github.com/open-cmsis-pack/generator-bridge/internal/utils ‑ TestStartSignalWatcher/test_if_it's_really_trapping_ctrl-c … ```

:recycle: This comment has been updated with latest results.

thorstendb-ARM commented 1 year ago

Ready for review 0.9 Remarks:

soumeh01 commented 1 year ago

Ready for review 0.9 Remarks:

  • Linter: Error: Error return value is not checked (errcheck)

    • need hint
  • utils_test: TestFileExists()

    • Test runs when "Debug" but fails in "Run"
  • Vulnerability No1: GO-2023-2185:

    • Error: No1: internal/stm32CubeMX/stm32CubeMX.go:107:16: stm32CubeMX.Launch calls exec.Cmd.Run, which eventually calls filepath.Abs
    • Error: No2: internal/stm32CubeMX/stm32CubeMX.go:101:21: stm32CubeMX.Launch calls exec.Command, which calls filepath.Base
    • Error: No3: internal/utils/utils.go:70:23: utils.ConvertFilename calls filepath.Clean
    • Error: No4: internal/readFile/readFile.go:22:25: readFile.Process calls filepath.Dir
    • Error: No5: internal/stm32CubeMX/stm32CubeMX.go:116:27: stm32CubeMX.WriteProjectFile calls filepath.Join
    • Error: No6: internal/utils/utils.go:82:26: utils.ConvertFilename calls filepath.Rel
    • Error: No7: internal/stm32CubeMX/stm32CubeMX.go:107:16: stm32CubeMX.Launch calls exec.Cmd.Run, which eventually calls filepath.VolumeName

Linter error: Please check the summary page. Github reports 11 issues with code annotation. Vulnerability: AS the error states, Please update the golang version to 1.21 as the older version 1.20 has vulnerabilities