Skip to content

andrewmcodes/standardrb-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Caution

This action is unnecessary and will slow down your CI suite. As such, it is not actively maintained. To migrate, add this job to your workflow to achieve the same results:

standardrb:
  name: StandardRB
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v4
    - uses: ruby/setup-ruby@v1
      with:
        bundler-cache: true
    - run: bundle exec standardrb --format github --parallel

✅ StandardRB Action

A GitHub Action to run StandardRB against your code and create annotations in the GitHub UI.

📄 Introduction

GitHub Actions are an amazing new tool that can dramatically improve productivity while using the GitHub platform. While it is not hard to write a custom GitHub action to run StandardRB on your codebase, this action takes that functionality one step further using the checks API. After the StandardRB Linter Action runs StandardRB against your code, it will create annotations that you can easily view, matched up with the offending code.

💡 Usage

Add the following to your GitHub action workflow to use StandardRB Linter Action:

- name: StandardRB Linter
  uses: andrewmcodes/standardrb-action@v2.0.0
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

📦 Example Workflow

Here is an example workflow file incorporating StandardRB Linter Action:

name: StandardRB

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: StandardRB Linter
      uses: andrewmcodes/standardrb-action@v2.0.0
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

⚠️ Gotchas

Due to the GitHub Check Runs API, we can only return 50 annotations per run. See here for more info.

This is not an issue if you remove this action from your workflow and replace with bundle exec standardrb --format github --parallel as mentioned in the caution above.

📸 Screenshots

StandardRB Action Checks Overview StandardRB Action File Annotation

🔖 Changelog

View our Changelog

🆘 Contributing

Contributing Guide

🚨 Code of Conduct

Code of Conduct

©️ License

MIT