mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
42 lines
731 B
Crystal
42 lines
731 B
Crystal
require "./ameba/*"
|
|
require "./ameba/ast/**"
|
|
require "./ameba/ext/**"
|
|
require "./ameba/rule/**"
|
|
require "./ameba/formatter/*"
|
|
require "./ameba/source/**"
|
|
|
|
# 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
|
|
# ```
|
|
module Ameba
|
|
extend self
|
|
|
|
VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify }}
|
|
|
|
# Initializes `Ameba::Runner` and runs it.
|
|
# Can be configured via `config` parameter.
|
|
#
|
|
# Examples:
|
|
#
|
|
# ```
|
|
# Ameba.run
|
|
# Ameba.run config
|
|
# ```
|
|
def run(config = Config.load)
|
|
Runner.new(config).run
|
|
end
|
|
end
|