lib/haml_lint/cli.rb
def run(args)
      options = HamlLint::Options.new.parse(args)
      act_on_options(options)
    rescue HamlLint::Exceptions::InvalidCLIOption => ex
      log.error ex.message
      log.log "Run `#{APP_NAME}` --help for usage documentation"
      Sysexits::EX_USAGE
    rescue HamlLint::Exceptions::InvalidFilePath => ex
      log.error ex.message
      Sysexits::EX_NOINPUT
    rescue HamlLint::Exceptions::NoLintersError => ex
      log.error ex.message
      Sysexits::EX_NOINPUT
    rescue => ex
      print_unexpected_exception(ex)
      Sysexits::EX_SOFTWARE
    end
# Parses the given command-line arguments and executes appropriate logic
# based on those arguments.
#
# @param args [Array<String>] command line arguments
# @return [Fixnum] exit status returned by the application
Parses the given command-line arguments and executes appropriate logic
based on those arguments.
Parses the given command - line arguments and executes appropriate logic based on those arguments .
def run(args)
      options = HamlLint::Options.new.parse(args)
      act_on_options(options)
    rescue HamlLint::Exceptions::InvalidCLIOption => ex
      log.error ex.message
      log.log "Run `#{APP_NAME}` --help for usage documentation"
      Sysexits::EX_USAGE
    rescue HamlLint::Exceptions::InvalidFilePath => ex
      log.error ex.message
      Sysexits::EX_NOINPUT
    rescue HamlLint::Exceptions::NoLintersError => ex
      log.error ex.message
      Sysexits::EX_NOINPUT
    rescue => ex
      print_unexpected_exception(ex)
      Sysexits::EX_SOFTWARE
    end
def run ( args ) options = HamlLint :: Options . new . parse ( args ) act_on_options ( options ) rescue HamlLint :: Exceptions :: InvalidCLIOption => ex log . error ex . message log . log "Run `#{APP_NAME}` --help for usage documentation" Sysexits :: EX_USAGE rescue HamlLint :: Exceptions :: InvalidFilePath => ex log . error ex . message Sysexits :: EX_NOINPUT rescue HamlLint :: Exceptions :: NoLintersError => ex log . error ex . message Sysexits :: EX_NOINPUT rescue => ex print_unexpected_exception ( ex ) Sysexits :: EX_SOFTWARE end
Parses the given command-line arguments and executes appropriate logic
based on those arguments.
Parses the given command - line arguments and executes appropriate logic based on those arguments .
exit status returned by the application
exit status returned by the application
Fixnum
args
command line arguments
command line arguments