Skip to content

chore: support for rubocop linting on ruby-head #588

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

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

Hunga1
Copy link
Contributor

@Hunga1 Hunga1 commented Jan 14, 2022

Added support for linting all Rubocop supported versions of Ruby, including ruby-head, while maintaining library support for Ruby v2.4. Changes include:

  • Removed Rubocop from gem dependencies, and moved Rubocop installation and execution to GH Actions test and deploy workflow for all compatible versions of Ruby (2.5, 2.6, 2.7, 3.0, ruby-head/3.1.0)
  • Upgraded Rubocop from 0.82.x to 1.24.x
  • Updated rubocop TODO config file for new linting errors caught by the upgraded Rubocop version
  • Removed lint scripting references from makefile

This approach addresses an issue that surfaces when upgrading Rubocop to a later version (>= 1.22.3) that supports linting ruby-head (3.1.0) features. Rubocop dropped support for Ruby v2.4 after Rubocop v1.12. To address dependency incompatibility between Rubocop and Ruby preventing a build of the library using Ruby v2.4, the Rubocop dependency is removed and linting is solely executed in the GH Action workflow for compatible versions of Ruby in the test job matrix.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

Removed rubocop from project dependencies. Moved rubocop install and execution to GH Actions for all compatible ruby versions. Removed lint command from makefile. Updated rubocop config files to latest version.
@Hunga1 Hunga1 merged commit c9a465a into twilio:main Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants