Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix section title blank line errors in README.adoc #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rdmueller
Copy link
Member

@rdmueller rdmueller commented Mar 3, 2025

Related to #18

Fix the self_test_readme action to pass without false positives for section title blank line errors in README.adoc.

  • Update asciidoc_linter/rules/whitespace_rules.py:

    • Modify WhitespaceRule to account for attributes or roles after section titles.
    • Update check_line method to handle attributes and roles correctly.
  • Add tests in tests/rules/test_heading_rules.py:

    • Add tests for headings followed by attributes.
    • Add tests for headings followed by roles.
  • Add test cases in tests/test_linter.py:

    • Add test cases for headings followed by attributes or roles.
  • Add test cases in tests/test_reporter.py:

    • Add test cases for formatting errors with headings followed by attributes or roles.

For more details, open the Copilot Workspace session.

Related to #18

Fix the self_test_readme action to pass without false positives for section title blank line errors in `README.adoc`.

* **Update `asciidoc_linter/rules/whitespace_rules.py`**:
  - Modify `WhitespaceRule` to account for attributes or roles after section titles.
  - Update `check_line` method to handle attributes and roles correctly.

* **Add tests in `tests/rules/test_heading_rules.py`**:
  - Add tests for headings followed by attributes.
  - Add tests for headings followed by roles.

* **Add test cases in `tests/test_linter.py`**:
  - Add test cases for headings followed by attributes or roles.

* **Add test cases in `tests/test_reporter.py`**:
  - Add test cases for formatting errors with headings followed by attributes or roles.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/docToolchain/asciidoc-linter/issues/18?shareId=XXXX-XXXX-XXXX-XXXX).
…itles

* Add debug output to `check_line` method to see why the whitespace_rules got triggered
* Modify `check_line` method to account for attributes or roles after section titles
* Add tests for attributes or roles after section titles in `test_heading_rules.py`
* Add test cases for attributes or roles after section titles in `test_linter.py`
* Add test cases for attributes or roles after section titles in `test_reporter.py`
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