diff --git a/audit-report.md b/audit-report.md new file mode 100644 index 00000000..2e33e512 --- /dev/null +++ b/audit-report.md @@ -0,0 +1,16 @@ +# Audit Report (Unstable Branch) + +## File Size +- **Grandfathered Oversized Files:** 44 +- **Total Excess Lines:** 54,278 (sum of lines exceeding the 1000-line limit for each file) + +## innerHTML Usage +- **Total Assignments:** 125 + +## Lint Status +- **Failures:** None + - `lint:assets` skipped (build required) + - `lint:sw-compat` skipped (git history unavailable) + +## Comparison +No previous report found in the repository for comparison. diff --git a/calculate_excess.js b/calculate_excess.js new file mode 100644 index 00000000..f23df719 --- /dev/null +++ b/calculate_excess.js @@ -0,0 +1,17 @@ +const fs = require('fs'); +const content = fs.readFileSync('file_size.log', 'utf8'); +const lines = content.split('\n'); +let totalExcess = 0; +let count = 0; +lines.forEach(line => { + const match = line.match(/\((\d+) lines\)/); + if (match) { + const lines = parseInt(match[1], 10); + if (lines > 1000) { + totalExcess += (lines - 1000); + count++; + } + } +}); +console.log('Count:', count); +console.log('Total Excess:', totalExcess); diff --git a/calculate_excess.mjs b/calculate_excess.mjs new file mode 100644 index 00000000..b955f8e8 --- /dev/null +++ b/calculate_excess.mjs @@ -0,0 +1,17 @@ +import { readFileSync } from 'node:fs'; +const content = readFileSync('file_size.log', 'utf8'); +const lines = content.split('\n'); +let totalExcess = 0; +let count = 0; +lines.forEach(line => { + const match = line.match(/\((\d+) lines\)/); + if (match) { + const lines = parseInt(match[1], 10); + if (lines > 1000) { + totalExcess += (lines - 1000); + count++; + } + } +}); +console.log('Count:', count); +console.log('Total Excess:', totalExcess);