Skip to content

Instantly share code, notes, and snippets.

@mlafeldt
Created December 4, 2012 12:08
Show Gist options
  • Select an option

  • Save mlafeldt/4203151 to your computer and use it in GitHub Desktop.

Select an option

Save mlafeldt/4203151 to your computer and use it in GitHub Desktop.
BP001 foodcritic rule
# Bigpoint's foodcritic rules
rule 'BP001', 'Missing poem in README' do
tags %w(style readme poem)
cookbook do |path|
file = File.join(path, 'README.md')
# XXX FC011 already checks that the README exists.
if File.file?(file) && (File.read(file) !~ /^Poem/)
[ file_match(file) ]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment