hainenber commented on code in PR #44201:
URL: https://github.com/apache/superset/pull/44201#discussion_r4166927313


##########
superset-frontend/scripts/internal/oxlint-metrics-uploader.js:
##########
@@ -64,12 +65,50 @@ function parseRuleId(code) {
 
   const [, namespace, rule] = match;
   if (namespace === 'eslint') {
-    return rule;
+    return { parsed: rule, pluginId: namespace };
   }
 
   // `eslint-plugin-unicorn(...)` is the same rule as `unicorn/...`
   const plugin = namespace.replace(/^eslint-plugin-/, '');
-  return `${plugin}/${rule}`;
+  return { parsed: `${plugin}/${rule}`, pluginId: plugin };
+}
+
+function parseOxlintResult(results, ruleIdPrefixes) {
+  // Process OXC JSON output
+  const metricsByRule = {};
+  const occurrencesData = [];
+
+  // OXC JSON format has diagnostics array
+  if (results.diagnostics && Array.isArray(results.diagnostics)) {
+    results.diagnostics.forEach(diagnostic => {
+      const { parsed: ruleId, pluginId } = parseRuleId(diagnostic.code);

Review Comment:
   Good catch! I've fixed in f1f96cff252a6d0d91a316cc2cedeb490d1d07db



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to