A GitHub Action to run Standard Ruby against your code. Here's what it does:
- Runs
bundle exec standardrb --fix
on the root directory of your repo - If any errors were auto-fixable, it commits those changes back to the repo
- If any errors remain, it fails the build with annotations for each failure
To separate Standard Ruby linting and formatting from your main test suite, you can add it in a standalone workflow:
name: Standard Ruby
on: [push]
jobs:
build:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
steps:
- name: Standard Ruby
uses: standardrb/standard-ruby-action@v1
You can add the following to your existing GitHub Action workflow:
- name: Standard Ruby
uses: standardrb/standard-ruby-action@v1
This will require you to add these permissions at the top-level of your workflow
(for example, after specifying the operating system via runs_on
):
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
There are no options.
[Update 6/17/2024: the current v1 release doesn't produce annotations like this, unfortunately. See #16]
This project follows Test Double's code of conduct for all community interactions, including (but not limited to) one-on-one communications, public posts/comments, code reviews, pull requests, and GitHub issues. If violations occur, Test Double will take any action they deem appropriate for the infraction, up to and including blocking a user from the organization's repositories.
A big thanks to Andrew Mason for kicking off this project as andrewmcodes/standardrb-acction!