Skip to content

Refactor HTML validation to use ES modules and improve error reporting#1197

Open
oyessb wants to merge 2 commits intomainfrom
PXWEB2-1046-html-validation
Open

Refactor HTML validation to use ES modules and improve error reporting#1197
oyessb wants to merge 2 commits intomainfrom
PXWEB2-1046-html-validation

Conversation

@oyessb
Copy link
Copy Markdown
Contributor

@oyessb oyessb commented Mar 30, 2026

Copilot generated summary:

This pull request significantly refactors the html-validator.js script to improve maintainability and enhance the output of HTML validation results.

Enhancements to validation output and error reporting:

  • Added functions to group validation messages by rule, sort them by frequency, and print concise summaries and detailed samples for both errors and warnings, making it easier to identify common issues.
  • Introduced an option to display detailed errors for a specific rule, improving the debugging experience for targeted validation problems.

Code modernization and maintainability improvements:

  • Migrated from CommonJS (require) to ES module (import) syntax and refactored the script to use modern JavaScript features, such as async/await and arrow functions.
  • Improved error handling and exit code management to ensure proper resource cleanup and more predictable script behavior.

@github-actions
Copy link
Copy Markdown

Branch Deployment to Cloudflare Pages

🚛 Preview URL: https://1b4420e6.pxweb2.pages.dev
🚧 Branch preview URL: https://pxweb2-1046-html-validation.pxweb2.pages.dev
🚚 Alternative Preview URL: https://e11b3d3f.pxweb2.pages.dev
👷 Alternative Branch preview URL: https://alternative-pxweb2-1046-html.pxweb2.pages.dev

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant