我有这个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
答案 0 :(得分:-1)
更改
lib = File.expand_path("../lib", __FILE__)
到
lib = File.expand_path("lib", __dir__)