standardrb / standard

Ruby's bikeshed-proof linter and formatter 🚲
Other
2.73k stars 214 forks source link

standardrb != rails standard. This is causing CI problems. #645

Closed dogweather closed 4 months ago

dogweather commented 4 months ago

Issue 1: different problems reported.

$ rails standard 
331 problems

$ standardrb
156 problems

My expectation is, these should the same.

Issue 2: todo creation not the same.

$ standardrb --generate-todo
$

$ bin/rails standard:generate-todo
Unrecognized command "standard:generate-todo" (Rails::Command::UnrecognizedCommandError)

My expectation is, these should both work.

In CI I've only been able to run rails standard so far. This is also what the standardrb github action does.

But since my local todo file can only be created with standardrb, it lists far fewer problems than rails standard finds, and so CI is broken.

Possible Workaround:

$ bundle exec rake standard STANDARDOPTS="--generate-todo"

rake aborted!

.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/gems/standard-1.33.0/lib/standard/rake.rb:18:in `block in <main>'

It crashes. But it does create the todo file that's compatible with rails standard. (Although no longer compatible with standardrb.)