Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial playground #2

Merged
merged 51 commits into from
Nov 13, 2023
Merged

Initial playground #2

merged 51 commits into from
Nov 13, 2023

Conversation

thorstendb-ARM
Copy link
Collaborator

@thorstendb-ARM thorstendb-ARM commented Sep 18, 2023

Start of project
#7

github-actions and others added 3 commits September 18, 2023 11:14
- reading of cbuild.yml
- start of CubeMX
- reading of .mxprohect (not finished)

removed:
- viper
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
@Open-CMSIS-Pack Open-CMSIS-Pack deleted a comment from codeclimate bot Sep 20, 2023
- path to sub file referenced from idx file can now be absolute
- changed Layer to GeneratorImport
	GeneratorImport GeneratorImportType `yaml:"generator-import,omitempty"`
- support for absolute "output" path (section IDX file: "generators")
@thorstendb-ARM
Copy link
Collaborator Author

thorstendb-ARM commented Nov 13, 2023

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
  • Coverage
    • requirements not met, more test functions must be added

@soumeh01
Copy link
Collaborator

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

@thorstendb-ARM thorstendb-ARM marked this pull request as ready for review November 13, 2023 08:51
Copy link
Member

@jkrech jkrech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unable to give qualified comments. But the second input file is not clear to me.

cmd/commands/commands.go Outdated Show resolved Hide resolved
cmd/commands/commands.go Show resolved Hide resolved
Copy link
Collaborator

@soumeh01 soumeh01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Collaborator

@brondani brondani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with cgen_mockup examples.
LGTM

Copy link
Member

@jkrech jkrech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as far as I understand it.

@jkrech jkrech merged commit 1994cd1 into main Nov 13, 2023
21 of 22 checks passed
@jkrech jkrech deleted the cmdLine branch November 14, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants