Open willtcarey opened 8 months ago
@willtcarey if I understand you right, I think setting a .standard.yml
with ruby_version: 2.7
should fix you. While RuboCop drops support for EOL'd rubies, Standard is designed (to the extent RuboCop will allow us) run the linter from newer rubies against older (very old, even 1.8.7) language targets. Give that a try?
https://github.com/standardrb/standard?tab=readme-ov-file#configuring-ruby_version
That's a great point. My Ruby version is actually stored in my Gemfile.lock so maybe I need to look into why Rubocop wasn't picking that up. What I wound up going with involved passing a ruby version argument to this action and using that version when installing Standard and running. It worked out alright, but I'd like to remove that complexity and have Standard/Rubocop pick up my Ruby version automatically like it should be able to.
main...brandnewbox:standard-ruby-action:main
#diff-1243c5424e
But anyways, it's good to know that despite the Ruby version being hardcoded, the action should be able to check lesser Ruby versions
Bug Report
Describe the bug
Standardrb action reports different linting errors then we get locally because of Ruby version mismatches.
To Reproduce
Steps to reproduce the behavior:
Locally we have code like the following which does not report a lint error.
When standardrb runs in Github Actions this code does report a linting error because this violates Standard's rules in Ruby 3.2.
Expected behavior
We expect to be able to run standardrb from the version of Ruby specified in our application so that the linting errors will match.
Action Version & Workflow File
Workflow File