A GitHub Action to run Standard Ruby against your code. Here's what it does:
bundle exec standardrb --fix
on the root directory of your repoTo 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@v1Adding 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
ruby-version
- If your project has a .ruby-version
file, this Action will use that version of Ruby. If not, this will be forwarded to the ruby/setup-ruby action, so it takes the same values.autofix
- If set to false
, the action will not attempt to auto-fix any errors. Defaults to true
.workdir
- If set the action will descend to this directory before running bundle exec standardrb …
and other relevant setup commands. Defaults to .
.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