A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/standardrb/standard-ruby-action below:

standardrb/standard-ruby-action: A GitHub Action to run Standard Ruby against your code.

Standard Ruby GitHub Action

A GitHub Action to run Standard Ruby against your code. Here's what it does:

  1. Runs bundle exec standardrb --fix on the root directory of your repo
  2. If any errors were auto-fixable, it commits those changes back to the repo
  3. If any errors remain, it fails the build with annotations for each failure
Creating a Standard Ruby workflow:

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
Adding to an existing workflow:

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

Example with options set:

- name: Standard Ruby
  uses: standardrb/standard-ruby-action@v1
  with:
    ruby-version: '3.3'
    autofix: false
    workdir: my/app/subdirectory

[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-action!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4