-
Notifications
You must be signed in to change notification settings - Fork 199
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
[LINT] Add rule explicit-begin #1336
base: master
Are you sure you want to change the base?
Conversation
Add rule to check if the begin keyword always follows a if/else/for. Related to chipsalliance#1321
This should be OK (clang-format was ran and tests were performed on a testcase). |
You can run your test with
|
Remove the fix suggestion as invalid
also move the error anchor to offending if/else/for in order to allow test to pass
Thanks, I understood the "reject" pattern thing. |
What is the status of this PR @suzizecat ? Looks like we were almost there, just needed to make all the tests work. |
Hi @hzeller , I don't have access to the computer used for developing this before next week, but I'll have a look again at this time. I'll let you know if I run in any issues. |
Hi @suzizecat. I was interested in this feature as a user and came across this PR. Are you wanting to finish this one off? Otherwise I'm happy to pick this up. FWIW: I copied your code into a branch here: https://github.com/sconwayaus/verible/tree/begin_end_rule. Wasn't a lot of work to make this build at the head, (couple of BUILD files was about it), and I added some for loop tests too. |
Copied the code from suzizecat@0b087d7 and rebased it to the head. Updated the tests and formatted.
Hi @sconwayaus, I had issues with building (probably the BUILD files you fixed) but had no time to work on this. |
Add rule to check if the begin keyword always follows a if/else/for.
Related to #1321