Skip to content

Fix Lint/RedundantBegin in Template::Engine#get_template#395

Merged
ellmetha merged 1 commit into
martenframework:mainfrom
papilip:fix/template-engine-redundant-begin
Jul 1, 2026
Merged

Fix Lint/RedundantBegin in Template::Engine#get_template#395
ellmetha merged 1 commit into
martenframework:mainfrom
papilip:fix/template-engine-redundant-begin

Conversation

@papilip

@papilip papilip commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The begin/end block inside Template::Engine#get_template is redundant: Crystal supports rescue directly at the block level. Removing it resolves the Lint/RedundantBegin offense (correctable) currently reported by ameba 1.7.0-dev, which fails the QA checks job.

@loaders.each do |loader|
  return loader.get_template(template_name)
rescue Errors::TemplateNotFound
end

Behaviour is unchanged. crystal tool format applied.

🤖 Generated with Claude Code

@ellmetha ellmetha merged commit 8668c19 into martenframework:main Jul 1, 2026
29 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants