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.
由于使用字符串连接是一种难闻的气味,我想在输出 CI 管道的 lint 步骤中自动检测并报告给开发人员。
例如,检测"The user " + user.name + " is blocked",并建议使用.format方法 - "The user {} is blocked".format(user.name)。
"The user " + user.name + " is blocked"
.format
"The user {} is blocked".format(user.name)
我已经在 pylint 和 flake8 中寻找规则,但没有人试图检测这种不良做法。