Skip to content

Add code formatter and CI/CD linter #46

Closed

Description

@Meldiron

Introduction

Code formatting is a necessary step of development to keep the code readable and maintainable.
It often comes in a pair with a linter, which is an automated process to ensure formatting has been done properly.

Finishing this issue will give you a basic understanding of PHP, Composer (PHP package manager), and GitHub Actions.

Task summary

Your goal is to implement code formatting in the following repositories:

1. Install and configure Laravel Pint

Install Pint by using Composer, a PHP dependency manager.

Make sure the version for this dependency is set to automatically upgrade minor and patch versions, but not the major version.
If those terms seem new to you, check out Semantic Versioning.

To configure Pint, you use a specific JSON file. Please refer to the Pint documentation to learn more.
Your goal is to configure Pint in all repositories to the same settings. Please set it to the same settings as we used in another one of our open-source repositories open-runtimes/executor.

2. Add commands to run formatting and linting

Set up Composer scripts called format and lint.

The formatting script should apply proper formatting to files when it runs.
Link script should show linting errors when it runs, but should not do changes to files.

If you ever get stuck, you can again refer to open-runtimes/executor, to see how it's been done there.

3. Add GitHub automation

Add GitHub action to run linter (composer lint) on each push, so pull requests run linter as check.

Store new GitHub action in the linter.yml file.

Just like before, if you feel stuck, you can refer to Open Runtimes Executor to validate your approach.

Activity

  1. changed the title [-]Add code formatter and CI/CD linter to Utopia core libraries[/-] [+]Add code formatter and CI/CD linter[/+] on Nov 6, 2024
  2. BretteFitzgibbon commented on Nov 11, 2024

    @BretteFitzgibbon

    My team is working on this.

  3. krishneetRAJ commented on Dec 6, 2024

    @krishneetRAJ

    Hello, I'm currently working on the storage repository. I'm having trouble getting this repository to run and build. I have checked the README.md, Contributing.md, and the Dockerfile as well, since I thought these could be good places to start. However, I couldn't find any explicit instructions, and I just don't know if I'm looking in the wrong place. Any help would be much appreciated!

  4. MichaelLy766 commented on Dec 21, 2024

    @MichaelLy766

    Hi @Meldiron,
    I’ve submitted a pull request that may resolve this issue in the Cache repository. When you have the chance, could you review it? Let me know if there’s anything I can clarify or improve. Thanks!

  5. BretteFitzgibbon commented on Jan 5, 2025

    @BretteFitzgibbon

    Hi @Meldiron,
    I have submitted pull requests for the Image, Orchestration and Compression repositories. When you have the chance, could you please review them? I am open to any feedback you might have. Thank you!

  6. ChiragAgg5k commented on Sep 25, 2026

    @ChiragAgg5k
    Member

    packages/cache now lives in appwrite/appwrite (appwrite/appwrite#13899), where Pint, PHPStan (level max) and Rector run on every change via bin/monorepo check cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions