ExpandPathArguments上的rubocop错误

时间:2018-03-09 16:51:05

标签: fastlane rubocop rubocop-rspec

我有这个rubocop错误

=

如何修复此错误? cos关注rubocop建议我会得到另一个错误

Offenses:

fastlane-plugin-lizard.gemspec:1:12: C: Style/ExpandPathArguments: Use expand_path('lib', __dir__) instead of expand_path('../lib', __FILE__).
lib = File.expand_path("../lib", __FILE__)
           ^^^^^^^^^^^

10 files inspected, 1 offense detected
RuboCop failed!
Exited with code 1

1 个答案:

答案 0 :(得分:-1)

更改

lib = File.expand_path("../lib", __FILE__)

lib = File.expand_path("lib", __dir__)