Skip to content

Conversation

QuentiumYT
Copy link
Member

No description provided.

@QuentiumYT QuentiumYT assigned QuentiumYT and Copilot and unassigned QuentiumYT Sep 10, 2025
@QuentiumYT
Copy link
Member Author

This pull request refactors the summary generation logic for various report types in the report package, focusing on consistency in output keys, improved grade calculation, and better handling of invalid or missing data. It also updates related test snapshots to match the new output formats. The changes enhance maintainability and clarity of the summary data, especially for accessibility and RGPD declarations.

Summary generation improvements

  • Standardized summary output keys to use the format *_Grade (e.g., declaration_a11yGrade, declaration_rgpd-mlGrade) and improved grade calculation logic for 404, accessibility, and RGPD declaration summaries. [1] [2] [3]
  • Enhanced handling of missing or invalid report data in summary functions, ensuring undefined or null values are returned instead of objects with undefined properties. [1] [2]

Refactoring and code consistency

  • Refactored summary functions for codescan, dependabot, dsfr, ecoindex, github_repository, http, and lighthouse to consistently destructure report objects, check for valid grades/counts, and return standardized output. [1] [2] [3] [4] [5] [6] [7]

Test and snapshot updates

  • Updated Jest test snapshots and expectations to reflect new summary output formats and grade calculation logic, including accessibility and RGPD declaration test cases. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Minor cleanup

  • Removed unused dependencies and imports, such as @socialgouv/eslint-config-strict, fs, and yaml, to streamline the codebase. [1] [2]
  • Simplified the main report generation function to directly return the mapped and filtered results.

@QuentiumYT QuentiumYT closed this Sep 10, 2025
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.

2 participants