commitAuthors:bugfix - fix when pass invalid line to SetCommitAuthors#978
Conversation
1c0f78f to
1ead9f2
Compare
1ead9f2 to
90dfac3
Compare
90dfac3 to
aa85cc8
Compare
e147108 to
6e0972a
Compare
… and changed formatters error handling approach Fix a bug in internal/utils/file.go where line value wasn't being restored to 0 when loop restarted, instead of ignoring erros and adding vulnerabilities to analysis slices now we ignore vulnerabilities we can't parse and add an error log to final analysis. Also added error return to GetDependencyCodeFilepathAndLine and GetDependencyInfo and some logging messages when this error is found. Removed unused function ReplacePathSeparator. Also changed some LogError to LogErrorWithLevel and setting errors to analysisError to be print on analysis end. Signed-off-by: Ian Cardoso <[email protected]>
6e0972a to
a8b6450
Compare
|
I will approve this pull request, but I believe that in the near future it will be necessary to improve this formatter structure.There is a lot of duplicated code, I believe we could have something similar to the default formatter of the engine, leaving only the parse of the output for each tool, I also don't see much sense in the separation between the engines and formatters package, just complicating the project structure. |
This is definitely true. I've already thought about some possible improvements to this, I think we should discuss it. |
… and changed formatters error handling approach (#978) Fix a bug in internal/utils/file.go where line value wasn't being restored to 0 when loop restarted, instead of ignoring erros and adding vulnerabilities to analysis slices now we ignore vulnerabilities we can't parse and add an error log to final analysis. Also added error return to GetDependencyCodeFilepathAndLine and GetDependencyInfo and some logging messages when this error is found. Removed unused function ReplacePathSeparator. Also changed some LogError to LogErrorWithLevel and setting errors to analysisError to be print on analysis end. Signed-off-by: Ian Cardoso <[email protected]> (cherry picked from commit 0c1e691)
Fix a bug in internal/utils/file.go where line value wasn't being restored to 0 when loop restarted, adding error return to GetDependencyCodeFilepathAndLine and GetDependencyInfo and some logging messages when this error is found. Removed unused function ReplacePathSeparator. Also changed some LogError to LogErrorWithLevel and setting errors to analysisError to be print on analysis end
Signed-off-by: Ian Cardoso [email protected]
- What I did
- How to verify it
- Description for the changelog