29 lines
771 B
Ruby
Executable File
29 lines
771 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
require_relative "../gems/tatl_tael/lib/tatl_tael"
|
|
require "yaml"
|
|
require_relative "./linter"
|
|
|
|
# # load personal config
|
|
require "dotenv"
|
|
Dotenv.load
|
|
|
|
linter_options = {
|
|
linter_name: "tatl_tael",
|
|
skip_file_size_check: true,
|
|
skip_wips: false,
|
|
custom_comment_generation: true,
|
|
generate_comment_proc: proc do |config|
|
|
TatlTael::Linters.comments(config)
|
|
end,
|
|
auto_correct: ENV["AUTO_CORRECT_LINTERS"]
|
|
}
|
|
|
|
user_config_file = File.expand_path("../../gems/dr_diff/config/gergich_user_config.yml", __FILE__)
|
|
if File.exists?(user_config_file)
|
|
config = YAML.load_file(user_config_file) || {}
|
|
user_list = config['only_report_errors'] || []
|
|
exit 0 if user_list.include?(ENV['GERRIT_EVENT_ACCOUNT_EMAIL'])
|
|
end
|
|
|
|
Linter.new(linter_options).run
|