-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(diagnostics): differentiate linter warnings from fatal errors #6258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way.\n\nFixes RooCodeInc#4622
…ncb/Roo-Code into fix/issue-4622-linter-errors
| if (typeof value === "string") { | ||
| // Only escape <, >, and & characters | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") |
Check warning
Code scanning / CodeQL
Replacement of a substring with itself Medium
| if (typeof value === "string") { | ||
| // Only escape <, >, and & characters | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") |
Check warning
Code scanning / CodeQL
Replacement of a substring with itself Medium
| if (typeof value === "string") { | ||
| // Only escape <, >, and & characters | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") |
Check warning
Code scanning / CodeQL
Replacement of a substring with itself Medium
| if (typeof value === "string") { | ||
| // Only escape <, >, and & characters | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") |
Check warning
Code scanning / CodeQL
Replacement of a substring with itself Medium
| if (typeof value === "string") { | ||
| // Only escape <, >, and & characters | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") |
Check warning
Code scanning / CodeQL
Replacement of a substring with itself Medium
| if (typeof value === "string") { | ||
| // Only escape <, >, and & characters | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") | ||
| return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">") |
Check warning
Code scanning / CodeQL
Replacement of a substring with itself Medium
| indentBy: "", | ||
| suppressEmptyNode: true, | ||
| processEntities: false, | ||
| tagValueProcessor: (name, value) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The XMLBuilder processors now simply return the original characters (e.g. replacing '&' with '&'). This does not perform proper XML escaping. It should replace '&' with '&', '<' with '<', and '>' with '>' to prevent XML injection issues.
|
Hey @emincb Thank you for the time you put into this, we really appreciate it. However I don't think this is a problem anymore, the issue was with Gemini 2.5 Flash but I haven't heard about this issue again, have you experienced it? do you have any examples of it? The main issue is that I'm unable to replicate the issue so I don't know if this will fix it or not. I'll close it for now but please let me know if you have more information about it. |

This change addresses an issue where linter errors were treated as fatal, causing unnecessary retries and inefficient file writes. The getNewDiagnostics function has been updated to categorize diagnostics into problems (fatal errors) and warnings (linter errors). The DiffViewProvider has been updated to consume this new structure and present the information to the AI in a more structured way. Fixes #4622
Important
Differentiate linter warnings from fatal errors in diagnostics to improve efficiency and prevent unnecessary retries.
getNewDiagnosticsinindex.tsnow categorizes diagnostics intoproblems(fatal errors) andwarnings(linter errors).DiffViewProviderinDiffViewProvider.tsupdated to handle and display newproblemsandwarningsmessages.index.test.tsto verify correct categorization of diagnostics intoproblemsandwarnings.vscode.tsmock to simulatevscodeenvironment for testing.This description was created by
for d04b46f. You can customize this summary. It will automatically update as commits are pushed.