Add draft for unified highlighting api that can be used via database …#57
Open
suung wants to merge 5 commits into
Open
Add draft for unified highlighting api that can be used via database …#57suung wants to merge 5 commits into
suung wants to merge 5 commits into
Conversation
Merged
ebeeee8 to
99ba264
Compare
Collaborator
|
@suung I would not merge this before the demo, since there is no other linter that we're going to add |
Collaborator
Author
@pessi-v I would like to merge it because a) we won't have capacity after the demo The question for me is: What would need to be done to merge it? Do you see specific blockers? |
pessi-v
approved these changes
Oct 30, 2025
suung
commented
Oct 30, 2025
| } | ||
|
|
||
| // Store to database if enabled | ||
| if (this.storeToDatabase) { |
suung
commented
Oct 30, 2025
| new vscode.Position(Math.max(0, highlight.end_line - 1), Math.max(0, highlight.end_column - 1)) | ||
| ); | ||
|
|
||
| const diagnostic = new vscode.Diagnostic(range, highlight.message, this.mapSeverityToVSCode(highlight.severity)); |
suung
commented
Oct 30, 2025
| } | ||
|
|
||
|
|
||
| private extractHighlightsFromAssessmentData(assessmentData: AssessmentData[]): CodeHighlight[] { |
suung
commented
Oct 30, 2025
| return contents; | ||
| } | ||
|
|
||
| private mapSeverity(severity: string): "error" | "warning" | "info" | "hint" { |
suung
commented
Oct 30, 2025
| } | ||
| }); | ||
|
|
||
| test.describe('Code Highlighting System', () => { |
suung
commented
Oct 30, 2025
| }, async (progress, token) => { | ||
| return new Promise<void>((resolve) => { | ||
| // Run Semgrep directly | ||
| const child = spawn('semgrep', ['--config', 'auto', '--json', filePath], { stdio: 'pipe' }); |
Collaborator
Author
There was a problem hiding this comment.
@pessi-v thinking again over it, all of this shouldn't be here, we have solved this already and it makes problems in the e2e tests...
Collaborator
Author
6 tasks
Collaborator
Author
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.