This repository was archived by the owner on Oct 10, 2023. It is now read-only.
Enhance go port recognition#181
Merged
thepetk merged 6 commits intoredhat-developer:mainfrom Apr 19, 2023
Merged
Conversation
Signed-off-by: thepetk <[email protected]>
Signed-off-by: thepetk <[email protected]>
Signed-off-by: thepetk <[email protected]>
mike-hoang
reviewed
Apr 14, 2023
mike-hoang
reviewed
Apr 17, 2023
Signed-off-by: thepetk <[email protected]>
| func main() { | ||
| http.HandleFunc("/", HelloHandler) | ||
| fmt.Println("Listening on localhost:8080") | ||
| http.ListenAndServe(":8080", nil) |
Check failure
Code scanning / gosec
Use of net/http serve function that has no support for setting timeouts
| } | ||
|
|
||
| for _, file := range files { | ||
| bytes, err := os.ReadFile(file) |
Check failure
Code scanning / gosec
Potential file inclusion via variable
| func main() { | ||
| http.HandleFunc("/", HelloHandler) | ||
| fmt.Println("Listening on localhost:8080") | ||
| http.ListenAndServe(":8080", nil) |
Check warning
Code scanning / gosec
Errors unhandled.
mike-hoang
approved these changes
Apr 18, 2023
thepetk
added a commit
to thepetk/alizer
that referenced
this pull request
Apr 20, 2023
* Add udi image case for mocked values of devfile types Signed-off-by: thepetk <[email protected]> * Add Go ports detection for project without framework Signed-off-by: thepetk <[email protected]> * Add tests for raw go project port recognition Signed-off-by: thepetk <[email protected]> * Remove unnecessary comments on test project Signed-off-by: thepetk <[email protected]> --------- Signed-off-by: thepetk <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Implements an additional check for port recognition upon
go_enricherchecks. More detailed, inside theGoEnricher.DoEnrichComponentforcase: model.Sourceif all checks insideframework.***Detector.DoPortDetectionhave not returned any ports, it runs theframework.DoGoPortsDetectionin order to check if there are any ports specified inside the root folder of the project.The
framework.DoGoPortsDetectionuses the same functionality for source port recognition (like other framework detectors). Finally a test case for Go project recognition is added in the test cases, along with a test project.Which issue(s) this PR fixes:
This PR partially fixes: #146