@sun-asterisk/sunlint 1.3.12 → 1.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,7 +111,7 @@ class OutputService {
111
111
  cwd: process.cwd(),
112
112
  filesAnalyzed: totalFiles,
113
113
  duration: metadata.duration,
114
- version: metadata.version || '1.3.12'
114
+ version: metadata.version || '1.3.13'
115
115
  }
116
116
  );
117
117
 
@@ -214,7 +214,7 @@ class SummaryReportService {
214
214
  info_count: 0, // Reserved for future use
215
215
  lines_of_code: scoringSummary.metrics.linesOfCode,
216
216
  files_analyzed: options.filesAnalyzed || 0,
217
- sunlint_version: options.version || '1.3.12',
217
+ sunlint_version: options.version || '1.3.13',
218
218
  analysis_duration_ms: options.duration || 0,
219
219
  violations: violationsSummary,
220
220
 
@@ -222,7 +222,7 @@ class SummaryReportService {
222
222
  metadata: {
223
223
  generated_at: new Date().toISOString(),
224
224
  tool: 'SunLint',
225
- version: options.version || '1.3.12',
225
+ version: options.version || '1.3.13',
226
226
  analysis_duration_ms: options.duration || 0
227
227
  },
228
228
  quality: {
@@ -294,20 +294,28 @@ class SummaryReportService {
294
294
  * @returns {string} Formatted text summary
295
295
  */
296
296
  formatTextSummary(summaryReport) {
297
- const { quality, violations, analysis } = summaryReport;
297
+ // Extract data from flat structure
298
+ const score = summaryReport.score;
299
+ const grade = summaryReport.quality?.grade || 'N/A';
300
+ const filesAnalyzed = summaryReport.files_analyzed || 0;
301
+ const linesOfCode = summaryReport.lines_of_code || 0;
302
+ const totalViolations = summaryReport.total_violations || 0;
303
+ const errorCount = summaryReport.error_count || 0;
304
+ const warningCount = summaryReport.warning_count || 0;
305
+ const violationsByRule = summaryReport.violations || [];
306
+ const violationsPerKLOC = summaryReport.quality?.metrics?.violationsPerKLOC || 0;
298
307
 
299
308
  let output = '\nšŸ“Š Quality Summary Report\n';
300
309
  output += '━'.repeat(50) + '\n';
301
- output += `šŸ“ˆ Quality Score: ${quality.score} (Grade: ${quality.grade})\n`;
302
- output += `šŸ“ Files Analyzed: ${analysis.files_analyzed}\n`;
303
- output += `šŸ“‹ Rules Checked: ${analysis.rules_checked}\n`;
304
- output += `šŸ“ Lines of Code: ${analysis.lines_of_code.toLocaleString()}\n`;
305
- output += `āš ļø Total Violations: ${violations.total} (${violations.by_severity.errors} errors, ${violations.by_severity.warnings} warnings)\n`;
306
- output += `šŸ“Š Violations per KLOC: ${quality.metrics.violationsPerKLOC}\n`;
310
+ output += `šŸ“ˆ Quality Score: ${score} (Grade: ${grade})\n`;
311
+ output += `šŸ“ Files Analyzed: ${filesAnalyzed}\n`;
312
+ output += `šŸ“ Lines of Code: ${linesOfCode.toLocaleString()}\n`;
313
+ output += `āš ļø Total Violations: ${totalViolations} (${errorCount} errors, ${warningCount} warnings)\n`;
314
+ output += `šŸ“Š Violations per KLOC: ${violationsPerKLOC}\n`;
307
315
 
308
- if (violations.by_rule.length > 0) {
316
+ if (violationsByRule.length > 0) {
309
317
  output += '\nšŸ” Top Violations by Rule:\n';
310
- violations.by_rule.slice(0, 10).forEach((item, index) => {
318
+ violationsByRule.slice(0, 10).forEach((item, index) => {
311
319
  output += ` ${index + 1}. ${item.rule_code}: ${item.count} violations (${item.severity})\n`;
312
320
  });
313
321
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sun-asterisk/sunlint",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "ā˜€ļø SunLint - Multi-language static analysis tool for code quality and security | Sun* Engineering Standards",
5
5
  "main": "cli.js",
6
6
  "bin": {