Enhance documentation and improve code readability#6
Conversation
Enhance the documentation for the blit_rgn1_slip function to clarify its purpose and behaviour. The updated comments explain how the function adjusts the region's origins and extent to ensure non-negative values, and specify the return values based on the region's position relative to positive space.
Adjusted the formatting of the header guard in the rgn1.h file.
Reformat the calculation of the offset in the blit_rgn1_slip function to enhance clarity. The conditional logic is now more readable with proper indentation and line breaks.
This change cleans up the README file by removing unnecessary editor configuration options that are not relevant to the project documentation.
Set README.md as the main page for Doxygen documentation. Updated the source directories for Doxygen to include the project's source and exclude the binary directory.
Updated code block syntax in README.md to ensure consistent formatting across examples. Changed language identifiers from 'c' to '```c' and 'bash' to '```bash' for Doxygen compatibility.
Create a new workflow to automate the generation and deployment of documentation using Doxygen. This includes steps for checking out the repository, installing dependencies, generating the documentation, and deploying it to GitHub Pages.
There was a problem hiding this comment.
Pull request overview
This PR enhances documentation and improves code readability across the blit library. The changes include comprehensive Doxygen documentation for the blit_rgn1_slip function, standardization of code block formatting in the README, refactoring for better readability, and automation of documentation generation through a new GitHub Actions workflow.
- Added detailed Doxygen documentation for the
blit_rgn1_slipfunction explaining its purpose and behavior - Standardized code block formatting throughout README.md by removing spaces between triple backticks and language identifiers
- Configured Doxygen to use README.md as the main page and set up automated documentation deployment
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| inc/blit/rgn1.h | Fixed header guard formatting, added comprehensive documentation for blit_rgn1_slip, and refactored ternary operator for better readability |
| README.md | Removed unused editor options and standardized code block formatting for Doxygen compatibility |
| CMakeLists.txt | Updated Doxygen configuration to include README as main page and document the entire source tree |
| .github/workflows/doxygen.yml | Added new workflow to automate Doxygen documentation generation and deployment to GitHub Pages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # https://www.mcternan.me.uk/mscgen/ | ||
| find_package(Doxygen OPTIONAL_COMPONENTS dot mscgen dia) | ||
| if(DOXYGEN_FOUND) | ||
| set (DOXYGEN_USE_MDFILE_AS_MAINPAGE README.md) |
There was a problem hiding this comment.
The spacing before the opening parenthesis is inconsistent with the other set commands on lines 43-44. The project uses 'set(' without a space throughout this file. Consider removing the space for consistency.
| set(DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES) | ||
| set(DOXYGEN_SOURCE_BROWSER YES) | ||
| doxygen_add_docs(doxy ${PROJECT_SOURCE_DIR}/inc ${PROJECT_SOURCE_DIR}/src) | ||
| set (DOXYGEN_EXCLUDE ${CMAKE_BINARY_DIR}) |
There was a problem hiding this comment.
The spacing before the opening parenthesis is inconsistent with the other set commands on lines 43-44. The project uses 'set(' without a space throughout this file. Consider removing the space for consistency.
Removed unnecessary spaces in the Doxygen settings to ensure consistent formatting and improve readability.
Improve documentation for the
blit_rgn1_slipfunction, clarifying its purpose and behavior. Standardise code block formatting in the README for consistency and Doxygen compatibility. Refactor theblit_rgn1_slipfunction for better readability. Update Doxygen configuration to include the README as the main page and automate documentation generation with a new GitHub Actions workflow. Clean up the README by removing unused editor options.