Sha256: 5e046684bcafcfefe2829b294d11519187cde419386a31ece00c581e945bae75
Contents?: true
Size: 1.04 KB
Versions: 5
Compression:
Stored size: 1.04 KB
Contents
#!/usr/bin/env ruby require 'chutney' require 'optparse' options = {} OptionParser.new do |opts| opts.banner = 'Usage: gherkin_language [files]' opts.on('-v', '--[no-]verbose', 'Run verbosely') do |verbose| options[:verbose] = verbose end opts.on('--enable [CHECKS]', 'Enabled checks. Separated by ","') do |checks| options[:enable] = checks.split(',') end opts.on('--disable [CHECKS]', 'Disabled checks. Separated by ","') do |checks| options[:disable] = checks.split(',') end opts.on('-f', '--filepath [file/s]', 'File path where features are located') do |file| options[:files] = file end end.parse! linter = Chutney::ChutneyLint.new linter.disable options[:disable] if options.key? :disable linter.enable options[:enable] if options.key? :enable linter.set_linter files = ARGV.map { |pattern| Dir.glob(pattern) }.flatten files += Dir.glob(options[:files]) if options.key? :files files = Dir.glob('features/**/*.feature') if ARGV.empty? && !options.key?(:files) files.each do |file| linter.analyze file end exit linter.report
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
chutney-1.6.3 | exe/chutney |
chutney-1.6.2 | exe/chutney |
chutney-1.6.1 | exe/chutney |
chutney-1.6.0 | exe/chutney |
chutney-0.5.0 | exe/chutney |