Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regular expression for core types and add test #13

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

gemmaro
Copy link
Contributor

@gemmaro gemmaro commented Aug 4, 2024

Hello,

This updates the regular expression for core types.
It makes, for example, not to recognize StringScanner as String (core type) and Scanner.

Thanks,

Copy link
Owner

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

@gemmaro Thanks for the pull request. The regex fix looks good, but the CI fails due to the new test.

It'd be helpful if you could separate the bug fix from the test addition. 🙏🏼

@ybiquitous
Copy link
Owner

* rbs-mode.el (rbs-mode--core-type-regexp): Add word end pattern at the end of
this regular expression.
* CHANGELOG.md: Add a change log entry.
@gemmaro
Copy link
Contributor Author

gemmaro commented Aug 5, 2024

@ybiquitous Thank you for the pointer. I tweaked the GitHub Actions settings and splitted into several commits.

Copy link
Owner

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

Thanks for separating commits. The tests are executed on CI, but they still fails due to incorrect expectations. Can you take a look again?

.github/workflows/test.yml Show resolved Hide resolved
gemmaro added 2 commits August 5, 2024 20:15
* rbs-mode-test.el: Add regression tests for core type regexp.
* .github/workflows/test.yml: Add GitHub Actions settings for ERT [1].
The first elisp-check is for linting source [2].
[1] https://github.com/leotaku/elisp-check#tests
[2] https://github.com/leotaku/elisp-check/blob/b931bcc80dbd7e6dd8b3fa05fecd899025bcb811/index.js#L14-L25

Co-authored-by: Masafumi Koba <https://github.com/ybiquitous>
* Makefile (check): Add a task.
* .editorconfig: Add EditorConfig settings for Makefile.
@gemmaro
Copy link
Contributor Author

gemmaro commented Aug 5, 2024

@ybiquitous I updated the test file to load rbs-mode.el. Let's see if it works...
I also used your suggestion to avoid shadowing the source file.

@ybiquitous ybiquitous changed the title Update the regular expression for core types. Fix regular expression for core types and add test Aug 6, 2024
@ybiquitous ybiquitous self-requested a review August 6, 2024 00:15
Copy link
Owner

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

Thank you. LGTM 👍🏼

@ybiquitous ybiquitous merged commit 95185c5 into ybiquitous:main Aug 6, 2024
6 checks passed
@ybiquitous ybiquitous added the bug Something isn't working label Aug 6, 2024
@ybiquitous
Copy link
Owner

https://github.com/ybiquitous/rbs-mode/releases/tag/v0.3.2 is released! 🌮
Thanks for your contribution. 😄

@gemmaro gemmaro deleted the fix/boundary branch August 6, 2024 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants