Skip to content

Fix #557: Don't try to print compiled regexes as strings#558

Merged
NelsonVides merged 1 commit into
maint-4.2from
brujo.fix.557
Feb 20, 2026
Merged

Fix #557: Don't try to print compiled regexes as strings#558
NelsonVides merged 1 commit into
maint-4.2from
brujo.fix.557

Conversation

@elbrujohalcon

Copy link
Copy Markdown
Member

Description

Elvis was failing to generate results for atom_naming_convention since it was trying to "print" a compiled regex as a string (~ts).

Closes #557.

@elbrujohalcon elbrujohalcon added this to the 4.2.2 milestone Feb 20, 2026
@elbrujohalcon elbrujohalcon changed the base branch from main to maint-4.2 February 20, 2026 13:25
Comment thread src/elvis_style.erl

@NelsonVides NelsonVides left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the precompiled regex, good catch!

@NelsonVides NelsonVides merged commit 475c020 into maint-4.2 Feb 20, 2026
7 checks passed
@NelsonVides NelsonVides deleted the brujo.fix.557 branch February 20, 2026 15:38
elbrujohalcon added a commit that referenced this pull request Feb 25, 2026
* Fix #557: Don't try to print compiled regexes as strings (#558)

Elvis was failing to generate results for atom_naming_convention since it was trying to "print" a compiled regex as a string (~ts).

* Hopefully optimize `elvis_code:find/4` (#559)

* Hopefully optimize `elvis_code:find/4`

* Adjust comment

* Slim out lines

* Invert condition checking

* Slim things up again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

elvis_style's atom_naming_convention fails to report errors

2 participants