2017-10-26 16:46:58 +00:00
|
|
|
require "./ameba/*"
|
2017-11-01 11:10:34 +00:00
|
|
|
require "./ameba/ast/*"
|
2017-11-07 21:50:25 +00:00
|
|
|
require "./ameba/rule/*"
|
2017-11-06 08:38:17 +00:00
|
|
|
require "./ameba/formatter/*"
|
2017-10-26 16:46:58 +00:00
|
|
|
|
2017-11-15 18:49:09 +00:00
|
|
|
# Ameba's entry module.
|
|
|
|
#
|
|
|
|
# To run the linter with default parameters:
|
|
|
|
#
|
|
|
|
# ```
|
|
|
|
# Ameba.run
|
|
|
|
# ```
|
|
|
|
#
|
|
|
|
# To configure and run it:
|
|
|
|
#
|
|
|
|
# ```
|
|
|
|
# config = Ameba::Config.load
|
|
|
|
# config.formatter = formatter
|
|
|
|
# config.files = file_paths
|
|
|
|
#
|
|
|
|
# Ameba.run config
|
|
|
|
# ```
|
|
|
|
#
|
2017-10-26 16:46:58 +00:00
|
|
|
module Ameba
|
2017-10-26 17:47:42 +00:00
|
|
|
extend self
|
|
|
|
|
2017-12-06 15:00:44 +00:00
|
|
|
VERSION = "0.3.0"
|
2017-11-15 18:49:09 +00:00
|
|
|
|
|
|
|
# Initializes `Ameba::Runner` and runs it.
|
|
|
|
# Can be configured via `config` parameter.
|
|
|
|
#
|
|
|
|
# Examples:
|
|
|
|
#
|
|
|
|
# ```
|
|
|
|
# Ameba.run
|
|
|
|
# Ameba.run config
|
|
|
|
# ```
|
|
|
|
#
|
2017-11-13 21:20:22 +00:00
|
|
|
def run(config = Config.load)
|
|
|
|
Runner.new(config).run
|
2017-10-26 17:47:42 +00:00
|
|
|
end
|
2017-10-26 16:46:58 +00:00
|
|
|
end
|