Skip to content

Commit

Permalink
Do not load missing config
Browse files Browse the repository at this point in the history
  • Loading branch information
veelenga committed Jul 29, 2023
1 parent 42e0fc4 commit 22ab170
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ameba-github_action/runner.cr
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ module Ameba::GithubAction
end

def ameba_config
Ameba::Config.load(path: "#{@workspace}/.ameba.yml").tap do |config|
filepath = "#{@workspace}/.ameba.yml"
filepath = nil unless File.exists?(filepath)

Ameba::Config.load(path: filepath).tap do |config|
config.formatter = Formatter.new(@workspace)
config.globs = ["#{@workspace}/**/*.cr", "!#{@workspace}/lib/**/*.cr"]
end
Expand Down

0 comments on commit 22ab170

Please sign in to comment.