OyvindSabo / gremlint

Linter/Code formatter for Gremlin
https://gremlint.com
Apache License 2.0
11 stars 6 forks source link

Make queries more idiomatic where possible #12

Open OyvindSabo opened 5 years ago

OyvindSabo commented 5 years ago

.outE().inV() --> .out() .inE().outV() --> .in() .outE().hasLabel('...').inV --> .out('...') .inE().hasLabel('...').outV() --> .in('...') .not(filter(...)) --> .not(...) Make sure to not do these changes if the query contains .path(), because then the results will be different. Also, note that .bothE().bothV() and .both() are not equivalent

This should probably be an option which can be toggled in the advanced options. I can imagine it being annoying to get the query rewritten when you just want to format it.