Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AO3-6605 Add Reviewdog for Rubocop check #4631

Merged

Conversation

brianjaustin
Copy link
Member

@brianjaustin brianjaustin commented Sep 10, 2023

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-6605

Purpose

Add a Reviewdog action to run Rubocop. This will give us more flexibility to add custom cops and upgrade to the latest version of rubcop (and its plugins). Example of how Rubocop warnings will show up: https://github.com/brianjaustin/ao3-sandbox/pull/1/files (the specific message is from a custom cop).

Note: no changes in what Rubocop flags are expected yet. Custom cops (and maybe other plugins?) will come in later PR(s)

Follow-Up Instructions

  1. Allow-list the action in this Github repository's settings (similar to AO3-6590 Add reviewdog for linting ERB files #4604)
    2. Deactivate/remove this repository from our Hound account -- optional but recommended to avoid duplicate comments and errors when we upgrade or add custom cops

Credit

Brian Austin (they/he)

@github-actions github-actions bot added Scope: Tests Only Only changes automated tests or test configuration Awaiting Review labels Sep 10, 2023
@Bilka2
Copy link
Contributor

Bilka2 commented Sep 12, 2023

Deactivate/remove this repository from our Hound account -- optional but recommended

According to .hound.yml, Hound should be running jshint. This leaves the question whether it runs as configured or if, like ERB Lint, it doesn't actually run. But in any case, .hound.yml should be updated to disable rubocop.

@brianjaustin
Copy link
Member Author

@Bilka2 good point! I have gotten JShint checks on a PR in the past, so I think it still works (at least somewhat)? I will also update the instructions to not totally remove Hound yet

@github-actions github-actions bot added Coder Has Actioned Review and removed Scope: Tests Only Only changes automated tests or test configuration Reviewed: Action Needed labels Sep 13, 2023
@brianjaustin brianjaustin added the Scope: Tests Only Only changes automated tests or test configuration label Sep 13, 2023
.hound.yml Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the Scope: Tests Only Only changes automated tests or test configuration label Sep 14, 2023
@brianjaustin brianjaustin added the Scope: Tests Only Only changes automated tests or test configuration label Sep 14, 2023
Copy link
Contributor

@Bilka2 Bilka2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works on my fork. The suggested change would be nice to have though.

.github/workflows/reviewdog.yml Outdated Show resolved Hide resolved
Co-authored-by: Bilka <Bilka2@users.noreply.github.com>
@github-actions github-actions bot removed the Scope: Tests Only Only changes automated tests or test configuration label Sep 15, 2023
@brianjaustin brianjaustin added the Scope: Tests Only Only changes automated tests or test configuration label Sep 15, 2023
@brianjaustin brianjaustin requested a review from Bilka2 September 15, 2023 01:13
@redsummernight redsummernight merged commit de957be into otwcode:master Nov 13, 2023
@redsummernight
Copy link
Member

I've added reviewdog/action-rubocop@e70b014b8062c447d6b515ee0209f834ea93e696, to the repo setting "Allow specified actions and reusable workflows".

@redsummernight redsummernight added this to the 0.9.352: Downloads milestone Nov 13, 2023
@brianjaustin brianjaustin deleted the AO3-6605-reviewdog-rubocop branch December 21, 2023 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed: Ready to Merge Scope: Tests Only Only changes automated tests or test configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants