shivasurya / code-pathfinder

Code Pathfinder, the open-source alternative to GitHub CodeQL. Built for advanced structural search, derive insights, find vulnerabilities in code.
https://codepathfinder.dev
GNU Affero General Public License v3.0
35 stars 6 forks source link

added better error handling for query parsing :star: #126

Closed shivasurya closed 1 month ago

shivasurya commented 1 month ago

This PR adds better error reporting for query syntax issues instead of crashing the whole application. 🎸

Progress: 100%
2024/09/07 22:25:31 Elapsed time:  456.686083ms
2024/09/07 22:25:31 Graph built successfully
Path-Finder Query Console: 
>wdfweldjfgw
Executing query: wdfweldjfgw

PathFinder Query syntax error: 
line 1:0 missing 'FIND' at 'wdfweldjfgw'
line 2:0 mismatched input '<EOF>' expecting 'AS'
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 80.03%. Comparing base (67437dd) to head (4263f1b). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sourcecode-parser/cmd/query.go 12.50% 6 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #126 +/- ## ========================================== - Coverage 80.27% 80.03% -0.25% ========================================== Files 12 12 Lines 1303 1307 +4 ========================================== Hits 1046 1046 - Misses 228 231 +3 - Partials 29 30 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.