iffyio commented on code in PR #2298:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2298#discussion_r3079132820


##########
AGENTS.md:
##########
@@ -0,0 +1,35 @@
+# Extensible SQL Lexer and Parser for Rust Agents Guidelines
+
+## General Agent Workflow
+1. You will write unit tests to ensure your code change is working as expected.
+2. You will run the commands in the Pre Commit Checks section below to ensure 
your change is ready for a pull request.
+3. When instructed to open a PR, you will follow the instructions in the Pull 
Request Guidelines section below.
+
+## General Coding Guidelines
+1. Refrain from adding conditions on specific dialects, such as 
`dialect_is!(...)` or `dialect_of!(... | ...)`. Instead, define a new function 
in the `Dialect` trait that describes the condition, so that dialects can turn 
this condition on more easily.
+2. Make targeted code changes and refrain from refactoring, unless it's 
absolutely required.
+
+## Unit Tests Guidelines
+- When testing a multi-line SQL statement, use a raw string literal, i.e. 
`r#"..."#` to preserve formatting.
+- You can use the following template for simple unit tests:
+```rust
+<dialect>().parse_sql_statements(r#"..."#).unwrap();
+```
+For example: `snowflake().parse_sql_statements(r#"SELECT * FROM 
my_table"#).unwrap();`

Review Comment:
   should we say to use `verified_stmt` instead of `parse_sql_statements`? 
thinking the former is usually preferrable since it tests the roundtrip 
behavior as well



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to