Skip to content

es50678/rubocop-linter-action

 
 

Repository files navigation

Rubocop Linter Action

Version Number codecov CodeFactor Linters Tests Changelog Documentation Status All Contributors

Rubocop Linter Action

Rubocop Linter Action is a GitHub Action to run Rubocop against your Ruby codebase and output the results in the GitHub Checks UI.

If you are submitting an issue, please use our reproduction template.

Introduction

This GitHub Action provides a way to easily run Rubocop on your Ruby or Ruby on Rails project. While it is possible to write a custom GitHub Action to run Rubocop on your codebase, this action takes that functionality one step further using the Checks API. After the Rubocop Linter Action runs Rubocop against your Ruby code, it will create annotations that you can easily view in the GitHub UI, matched up with the offending code.

Since GitHub Actions and the Checks API are continually changing, it is possible that there will be breaking API changes that affect this action. If so, please open an issue and we will look into it as soon as we can. Thank you for using this project! ❤️

Usage

Documentation

Please view the official documentation for more detailed instructions, including how to setup and use a configuration file to customize the action. Note that you can set the version for the documentation you are viewing in the bottom right.

NOTE: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.

This is straight out of GitHub's documentation. Put simply, this action won't work correctly on pull requests from a forked repository as is. I am open to a PR that will just output the results of the RuboCop run to the actions log if someone would like to take a shot at adding that!

Quickstart

Default usage, similar to running gem install rubocop && rubocop from your command line:

- name: Rubocop Linter Action
  uses: andrewmcodes/[email protected]
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Screenshots

Rubocop Linter Checks Overview Rubocop Linter File Annotation

Community

Changelog

View our Changelog

Contributing

Contributing Guide

Code of Conduct

Code of Conduct

License

MIT

Other Ruby GitHub Actions

Contributors

Thanks goes to these wonderful people (emoji key):


Andrew Mason

🚇 👀 📖 💻

Miguel Savignano

🚇 ⚠️ 💻

Dan McGregor

📖

amerritt14

💻

Brian Bugh

💻 ⚠️

Reid Beels

💻 ⚠️

Christopher Pezza

💻 📖 🚇

Mark Havekes

🐛

David Martinez

💻

Chris Oliver

👀 🤔

Erich Soares Machado

💻 🐛 ⚠️

Rahul Singh

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Rubocop Linter Action: A GitHub Action to run Rubocop against your code!

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 98.4%
  • Dockerfile 1.4%
  • Shell 0.2%