You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by "spmallette (via GitHub)" <gi...@apache.org> on 2025/12/30 21:30:26 UTC

[PR] gremlint and gremlin-mcp Improvements [tinkerpop]

spmallette opened a new pull request, #3289:
URL: https://github.com/apache/tinkerpop/pull/3289

   Improved gremlint with better argument formatting and added Gremlin formatting via gremlint as a feature to gremlin-mcp.
   
   VOTE +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] gremlint and gremlin-mcp Improvements [tinkerpop]

Posted by "kenhuuu (via GitHub)" <gi...@apache.org>.
kenhuuu commented on PR #3289:
URL: https://github.com/apache/tinkerpop/pull/3289#issuecomment-3721236185

   VOTE +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] gremlint and gremlin-mcp Improvements [tinkerpop]

Posted by "spmallette (via GitHub)" <gi...@apache.org>.
spmallette commented on code in PR #3289:
URL: https://github.com/apache/tinkerpop/pull/3289#discussion_r2670488336


##########
gremlint/src/formatQuery/__tests__/dotsAfterLineBreaks.test.ts:
##########
@@ -51,11 +50,10 @@ test('If dots are configured to be placed after line breaks, make sure they are
   ).toBe(`g.V()
   .hasLabel('person')
   .group()
-    .by(
-      values('name', 'age').fold())
+    .by(values('name', 'age')
+        .fold())
   .unfold()
-  .filter(
-    select(values)
-    .count(local)
-    .is(gt(1)))`);
+  .filter(select(values)
+          .count(local)

Review Comment:
   i don't like the whole dots starting a line at all in any event - almost wanted to remove the feature and get rid of the complexity.  i guess there could be special rules in this case to further indent, but i'm not sure what this should be for Gremlin exactly..  🤷 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] gremlint and gremlin-mcp Improvements [tinkerpop]

Posted by "spmallette (via GitHub)" <gi...@apache.org>.
spmallette merged PR #3289:
URL: https://github.com/apache/tinkerpop/pull/3289


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] gremlint and gremlin-mcp Improvements [tinkerpop]

Posted by "kenhuuu (via GitHub)" <gi...@apache.org>.
kenhuuu commented on code in PR #3289:
URL: https://github.com/apache/tinkerpop/pull/3289#discussion_r2670364480


##########
gremlint/src/formatQuery/__tests__/dotsAfterLineBreaks.test.ts:
##########
@@ -51,11 +50,10 @@ test('If dots are configured to be placed after line breaks, make sure they are
   ).toBe(`g.V()
   .hasLabel('person')
   .group()
-    .by(
-      values('name', 'age').fold())
+    .by(values('name', 'age')
+        .fold())
   .unfold()
-  .filter(
-    select(values)
-    .count(local)
-    .is(gt(1)))`);
+  .filter(select(values)
+          .count(local)

Review Comment:
   I don't think this needs to be changed but to me this looks very odd. In Java code, when you break a chain of methods for something like fluent APIs into separate lines, there would usually be extra indentation to show which part the next line is supposed to be connected to. Having the starting `.` line up exactly with the step before it just looks a bit odd. Again, just pointing this out in case anyone else feels the same but I probably wouldn't change it. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] gremlint and gremlin-mcp Improvements [tinkerpop]

Posted by "spmallette (via GitHub)" <gi...@apache.org>.
spmallette commented on code in PR #3289:
URL: https://github.com/apache/tinkerpop/pull/3289#discussion_r2673489351


##########
gremlint/src/formatQuery/__tests__/invalidIndentationAndMaxLineLength.test.ts:
##########


Review Comment:
   hmm...not sure what to actually write for a test. not really even sure what `maxLineLength` even means when it's smaller than the longest individual token. i guess that could all be explored, but i'm not sure i want to encode anything with tests right now for that. 
   
   there's a lot of open issues on gremlint - i think this is just another one: https://issues.apache.org/jira/browse/TINKERPOP-3224



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] gremlint and gremlin-mcp Improvements [tinkerpop]

Posted by "kenhuuu (via GitHub)" <gi...@apache.org>.
kenhuuu commented on code in PR #3289:
URL: https://github.com/apache/tinkerpop/pull/3289#discussion_r2670369172


##########
gremlint/src/formatQuery/__tests__/invalidIndentationAndMaxLineLength.test.ts:
##########


Review Comment:
   I think it might be good to have another test to show what should be done in this case rather than it just not crashing. This change can push the indentation of the new line further right, which means Traversals with more nesting will now have a higher chance of hitting the maxLineLength.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org