robotframework-robocop icon indicating copy to clipboard operation
robotframework-robocop copied to clipboard

TRY EXCEPT FINALLY from 5.0

Open bhirsz opened this issue 2 years ago • 2 comments

Robot Framework 5.0 introduce new syntax: TRY EXCEPT blocks. We need to handle them.

Things to consider:

  1. ~~Other rules should be able to access TRY, EXCEPT, FINALLY, ELSE blocks.~~ (#574)
  2. ~~Warn when trying to use this syntax as keyword name (Try, Except, finally..)~~ (#570).
  3. Special rules?
  4. ~~Parsing errors - multiple FINALLY, EXCEPT blocks, wrong order (EXCEPT -> TRY, TRY -> FINALLY -> EXCEPT)~~

bhirsz avatar Mar 13 '22 11:03 bhirsz

I will take care of 2)

bhirsz avatar Mar 13 '22 11:03 bhirsz

Regarding 1. I'm going over the rules and updating the test. Going by the order of the rules in directories - if skipped rule, it means it doesn't need update for RF5. Updated so far:

  • missing-space-after-comment
  • invalid-for-loop
  • invalid-if
  • missing-keyword-name
  • if-can-be-merged
  • bad-indent
  • misaligned-continuation

bhirsz avatar Mar 17 '22 20:03 bhirsz