Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何避免在 rubocop 中自动更正数字。我不认为以下是正确的。
- (Time.now.to_i * 10000).to_s + (Time.now.to_i * 10_000).to_s
如果您不同意该规则,则应在 Rubocop 配置文件中禁用它。我认为您必须将以下内容添加到.rubocop.yml:
.rubocop.yml
NumericLiterals: Enabled: false