segullshairbutt / islamopedia-books

This is a helper repository of islamopedia to keep the backup of the books in plain text format.
1 stars 0 forks source link

Implement GitHub Action for Tag and Class Verification #2

Open segullshairbutt opened 2 months ago

segullshairbutt commented 2 months ago

Description

We need to create a GitHub pipeline action that will ensure the integrity of our markup format by verifying that only tags are used and that no additional classes are introduced in the text. This check should be performed on every commit to maintain consistency and adherence to our formatting rules.

Background

This repository contains the markup format of a book, primarily written in HTML. To ensure the content does not include its formatting, we have restricted tags to only . We use CSS classes to distinguish between components, including native HTML elements. This approach requires strict enforcement to prevent unauthorized tags or classes from being added.

Requirements

Tag Verification:

  1. Ensure that only tags are present in the HTML content.
  2. Identify and flag any unauthorized tags in the entire repository or preferably in the changed files for each commit.

    Class Verification:

  3. Check that no additional classes have been introduced in the text.
  4. Validate that all classes used adhere to the predefined set of allowed classes.

Acceptance Criteria

Additional Information

Allowed Tags: <span> only. Allowed Classes: Look into the Directory structuring guide Output: Detailed report highlighting the unauthorized tags and classes, including file names and line numbers. Performance: Ensure the action runs efficiently without significantly slowing down the CI/CD pipeline.