Skip to content

GIF : CI/CD pipeline for ReScript formatter #3559

@JeevaRamu0104

Description

@JeevaRamu0104

Summary

Add a ReScript formatter check in the CI/CD pipeline.

Type

Issue

Context

Currently, our project does not have a step in the CI/CD pipeline to ensure that code is formatted with the ReScript formatter. This can lead to inconsistent code style across the codebase and increase review effort.

By integrating a formatter check into the pipeline, we can automatically verify formatting during pull requests and enforce consistency across the project. The command to be executed for this check is:

npm run re:format

Expected

  • The formatter-check CI job should pass when all files are correctly formatted.
  • The formatter-check CI job should fail if any files are not formatted according to ReScript rules.

Acceptance Criteria

  • A new GitHub Actions workflow (.github/workflows/formatter-check.yml) is added to run the formatter check.
  • The workflow runs on every pull request and push to main.
  • The pipeline executes the command npm run re:format.
  • The pipeline fails if any files are not properly formatted, and passes when all files are formatted.
  • Documentation is updated with instructions on running the formatter locally (npm run re:format).

Relevant Files

Resources

Existing workflow in the hyperswitch:
https://github.com/juspay/hyperswitch/blob/main/.github/workflows/CI-pr.yml

Mentor contact

@JeevaRamu0104

Helpful Docs

Pre-flight

  • I read the Contributing Guide and setup
  • I searched existing issues and PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueIssues which are beginner friendly and will give a starting understanding about the repohacktoberfest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions