2018-07-24 10:12:15 -04:00
|
|
|
if git.lines_of_code > 500
|
2018-07-24 11:31:57 -04:00
|
|
|
warn("This PR seems big, we prefer smaller PR. Please be sure this is needed and can't be split in smaller PRs.")
|
2018-07-24 10:12:15 -04:00
|
|
|
end
|
|
|
|
|
2018-07-24 13:35:47 -04:00
|
|
|
prettier_offenses = `prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.es6" "test/javascripts/**/*.es6"`.split('\n')
|
2018-07-24 11:31:57 -04:00
|
|
|
if !prettier_offenses.empty?
|
2018-07-24 10:12:15 -04:00
|
|
|
fail(%{
|
2018-07-24 13:10:54 -04:00
|
|
|
This PR has multiple prettier offenses (prettier.io). We recommend configuring prettier linting in your editor:\n
|
|
|
|
#{prettier_offenses.join("\n")}
|
2018-07-24 10:12:15 -04:00
|
|
|
})
|
|
|
|
end
|