-
Notifications
You must be signed in to change notification settings - Fork 59
Spot some issues with elvis.config
(non-existing modules, non-existing rules)
#397
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
base: main
Are you sure you want to change the base?
Conversation
I'm planning on adding: I don't know whether I should do all in this PR or cut it into smaller tasks |
I think it's Ok to keep, since it's now part of the language and inside our support scope, but I did leave a comment on maybe how to improve the current implementation's readability.
For me it's Ok to leave for later; just open a ticket 😄
Yeah, I commented on this. I'd keep the test if it wasn't failing, and add a comment on its intention if you can find it in Git history. Just removing it (or commenting it out) while implementing a new feature seems odd. I like the general direction, and have left a few comments. Edit: I tweaked the PR title since it'll be used for the generated changelog. Feel free to re-tweak if we decide on changing scope. |
elvis.config
elvis.config
(non-existing modules, non-existing rules)
Currently, I just don't know how to fix builds. If I make a But since it's a file path, in the Windows builds, I need to change it, so I need to find a way to change the CI a little bit to execute rebar commands with the proper |
Yeah, @bormilan … I don't know what's the deal with ex_doc and maybe… but I would be super-pragmatic and… just don't run ex_doc in OTP25. Period. Even more, we can just not run ex_doc in anything lower than the latest version we use for CI (i.e. 27). |
@elbrujohalcon, should we flag |
@paulo-ferraz-oliveira yeah, let's remove it. But maybe outside this PR, just so this PR can be merged with the fix for CI pipelines :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the PR is good as it is, but I left a tiny nit-picky comment for tests.
I also didn't check around to see what we usually use, but if we use pattern-matching everywhere instead of ct:fail/1,2
, do ignore my comment.
* elbrujohalcon.293.single_maybe_clause- New Rule: No Single Match Maybe * elbrujohalcon.293.single_maybe_clause- Fix doc path * elbrujohalcon.293.single_maybe_clause- Fix doc path * elbrujohalcon.293.single_maybe_clause- Fix macro * elbrujohalcon.293.single_maybe_clause- add feature flag * elbrujohalcon.293.single_maybe_clause- Adjust line numbers * elbrujohalcon.293.single_maybe_clause- Update docs to the latest style trend ✨ * elbrujohalcon.293.single_maybe_clause- Manually cherry-pick changes from #397 * Revert task name change
I will open a ticket(or more) later in this week, or maybe a discussion first, about these. |
@bormilan, you have merge rights, correct? If so, it feels like you can go ahead and merge this. |
Well… now you have to resolve the conflicts, @bormilan … but after that go ahead and (if CI is green) merge the thing. |
04da22e
to
27a42db
Compare
27a42db
to
fd468bd
Compare
It's strange that the test, |
Description
I made a little refactor on the
elvis_config:validate
usingmaybe
. Feel free to roast it; I'm still experiencing this feature and its capabilities.I skipped the validation of the rule configs in this step. (Should I implement it too, or is it okay to leave it for later?)
Now this solution can:
- spot if a non-existent module was given in the
elvis.config
- spot is a nonexistent rule(for an existing module) was given in the
elvis.config
- spot any other issues that were implemented in the past
I have a test that I commented out because I'm not sure what it was intended to test 😅 (I marked it in the files)
I see that it skips to load a module called
user_defined_rules
, but I'm not sure whether I need to keep this test or change it to expect my new error message.Also, I want to add more tests, so feel free to suggest some if you have some cases.
Closes #389;.