Cairo format GitHub Action

I have a strong opinion that every new programming language should ship with a standard code formatter. Golang does. Rust does. And yes, Cairo does as well 💪

The beauty of a code formatter is that it produces code that everyone hates equally. More importantly, it removes the all-so-tiresome comments about missing a space here or a newline there during code reviews.

It was pretty easy to set up a CI action that runs cairo-format on your repo, but now it’s got even easier. I’ve just released cairo-format-action, a GitHub Action that you can integrate in your repo to check for formatting transgressions. It’s easy as:

name: Cairo format

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Check Cairo formatting
        uses: milancermak/cairo-format-action@v1

Happy formatting 💫

Subscribe to cairopractice
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.