-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add ROS Interface #7523
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
Add ROS Interface #7523
Conversation
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.
All three of these extensions are very generic and match a lot more non-ROS files then they do ROS based on your search queries. This will mean there's a very likely chance more files will be incorrectly classified as ROS.
IFF you can come up with a heuristic that will 100% only match ROS files, you can add the extension to generic.yml
and add a heuristic - this needs to be a linear an PCRE2 compatible regex. If you can't, it's best not to add the extension and heuristic.
.msg
already exists in generic.yml
and already has a good regex so you only need to add a heuristic for this extension.
.action
does not meet out usage requirements so I'd advise against including it at this time. User can use an override until it's popular enough for inclusion.
.msg
al
@lildude thanks for the feedback! I've updated with some heuristics.
Curious what the requirements are – the one I saw in the template was "used in hundreds of repositories"? It's true that both Both |
I'm also not quite sure what is wrong with the current test failures...do I need to add more samples? |
Lines 109 to 110 in 4a1a14c
Note the issue referenced.
The failures indicate your heuristic regular expressions don't match the content of your samples. This will be because they're not valid (unescaped |
Thanks for the tips. I believe I've fixed the redos issue, although couldn't quite figure out how to get codeql up and running in my local working copy to verify, but I did check against https://makenowjust-labs.github.io/recheck/playground/. As for PCRE2 compatibility, I believe they already were and still are compatible according to https://regex101.com, but let me know if you're seeing otherwise. |
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.
LGTM. Thanks.
Important
The changes in this PR will not appear on GitHub until the next release has been made and deployed. See here for more details.
Adding a language grammar for ROS interfaces (messages, services, and actions).
Resolves #5619
Description
Checklist:
.msg
https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.msg+std_msgs+OR+geometry_msgs+OR+builtin_interfaces.srv
https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.srv+std_msgs+OR+geometry_msgs+OR+builtin_interfaces.action
https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.action+std_msgs+OR+geometry_msgs+OR+builtin_interfaces#22314e