Skip to content

Comments

added linter for code block line length and gen_numbering#70

Merged
Snooz82 merged 9 commits intomainfrom
check-code-line-len-and-links
Dec 5, 2025
Merged

added linter for code block line length and gen_numbering#70
Snooz82 merged 9 commits intomainfrom
check-code-line-len-and-links

Conversation

@Snooz82
Copy link
Member

@Snooz82 Snooz82 commented Dec 5, 2025

Improvements:

  • Code Blocks shall only have a max line length of 100 characters, because otherwise they are not completely included in the syllabus pdf. This is now automatically checked during build and build will fail if a line is longer.
  • The Python script to generate the chapter numbers to the headings, has been improved, to return with an exit code != 0 in case of a fix. This will now be used as check in the build and also available as pre-commit hook to the maintainers.

@Snooz82 Snooz82 added this to the 1.0.2 milestone Dec 5, 2025
@Snooz82 Snooz82 self-assigned this Dec 5, 2025
@Snooz82 Snooz82 requested review from a team and Copilot December 5, 2025 11:07
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds automated enforcement of code block line length limits and improves the chapter numbering generation script to support pre-commit workflows. The changes ensure that code examples in documentation remain properly formatted for PDF generation.

  • Added a remark linter plugin that enforces a 100-character maximum line length for code blocks in documentation
  • Enhanced gen_numbering.py to track and report file modifications with a non-zero exit code, enabling use as a pre-commit hook
  • Reformatted multiple documentation files to comply with the new 100-character line length limit

Reviewed changes

Copilot reviewed 18 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
website/src/remark/remark-code-max-line-length.js New remark plugin that validates code block line lengths and fails the build if lines exceed 100 characters
website/docusaurus.config.ts Integrates the new code max line length plugin into the Docusaurus build pipeline
tools/gen_numbering.py Refactored to use write_if_changed helper and return exit code based on number of modified files
tools/README.md Empty README file created (likely unintended artifact)
tools/gen_pdf.robot Changed browser to run in headless mode for automated PDF generation
website/docs/chapter-*/*.md Multiple documentation files reformatted to comply with 100-character line length in code blocks
website/docs/learning_objectives.md Auto-generated file updated with grammar fix ("an Initialization Files" → "Initialization Files")
README.md Auto-generated table of contents updated with corrected headings and links
LOs.csv Auto-generated learning objectives CSV updated with grammar fix
website/src/components/Quiz/quizComponents.ts Auto-generated file with updated timestamp

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Snooz82 and others added 8 commits December 5, 2025 14:18
Signed-off-by: René <snooz@posteo.de>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: René <snooz@posteo.de>
Signed-off-by: René <snooz@posteo.de>
Signed-off-by: René <snooz@posteo.de>
Signed-off-by: René <snooz@posteo.de>
Signed-off-by: René <snooz@posteo.de>
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 24 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Copy link
Member

@leeuwe leeuwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Snooz82 Snooz82 merged commit fde7ea2 into main Dec 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants