This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Enhance go port recognition #181
Merged
thepetk
merged 6 commits into
redhat-developer:main
from
thepetk:enhance_go_port_recognition
Apr 19, 2023
Merged
Enhance go port recognition #181
thepetk
merged 6 commits into
redhat-developer:main
from
thepetk:enhance_go_port_recognition
Apr 19, 2023
Conversation
This file contains 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
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
mike-hoang
reviewed
Apr 14, 2023
mike-hoang
reviewed
Apr 17, 2023
Signed-off-by: thepetk <thepetk@gmail.com>
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
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
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.
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 <thepetk@gmail.com> * Add Go ports detection for project without framework Signed-off-by: thepetk <thepetk@gmail.com> * Add tests for raw go project port recognition Signed-off-by: thepetk <thepetk@gmail.com> * Remove unnecessary comments on test project Signed-off-by: thepetk <thepetk@gmail.com> --------- Signed-off-by: thepetk <thepetk@gmail.com>
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_enricher
checks. More detailed, inside theGoEnricher.DoEnrichComponent
forcase: model.Source
if all checks insideframework.***Detector.DoPortDetection
have not returned any ports, it runs theframework.DoGoPortsDetection
in order to check if there are any ports specified inside the root folder of the project.The
framework.DoGoPortsDetection
uses 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