我rubocop
在我的应用程序中使用。我面临的问题是C: Carriage return character detected.
。
这是我的代码。
module WareHouse
class Stuff < ActiveRecord::Base
# my code goes here
end
end
任何人都可以帮助我吗?
我rubocop
在我的应用程序中使用。我面临的问题是C: Carriage return character detected.
。
这是我的代码。
module WareHouse
class Stuff < ActiveRecord::Base
# my code goes here
end
end
任何人都可以帮助我吗?
这意味着您的代码中有一个 Windows 样式的行尾。如果您需要与使用 Mac 或 Linux 机器的其他开发人员合作,这可能会导致问题。
http://www.rubydoc.info/github/bbatsov/rubocop/Rubocop/Cop/Style/EndOfLine
如果你不关心这个,你可以禁用或修改 EndOfLine 规则的配置:
https://github.com/bbatsov/rubocop/blob/master/config/default.yml#L476