1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rubocop がなんかちゃんと動いてくれない(後で調べる)

Last updated at Posted at 2016-08-09

ruby 2.3.1
rubocop 0.42.0
vim に syntastic いれて使ってる。

へんなエラーが出るしなんかちゃんと動いてないっぽい。。

hoge_controller.rb:1:1: C: Missing frozen string literal comment.
require_relative '../base_controller'
^
fuga_controller.rb:46:1: E: unexpected token $end
(Using Ruby 2.3 parser; configure using TargetRubyVersion parameter, under AllCops)

追記(一応解決)

Missing frozen string literal comment ってやつはこれ追加したらでなくなった。
なぜかというと Ruby3.0 に備えて Ruby2.3 だとうんぬんかんぬんって話みたいなので適当にぐぐってください。

Style/FrozenStringLiteralComment:
    Enabled: false

で、よくわからないのが unexpected token $end って方で、rubocop.yml をいじっていたらでなくなっていた。どういうことだろう。。。これも後で調べるかもしれない。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?