Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/instructions/generated-code.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Generated code

Some files in the repository contain generated code. These include:
- All files `*.gen.go`.
- All files under `clients/java`.
- All files under `clients/python`.
- All files under `clients/rust`.

DO NOT make any stylistic suggestions to these files. Only make suggestions to these files for actual errors.

### Examples

#### Not an error, do NOT report suggest a fix
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammatical error: "do NOT report suggest a fix" should be "do NOT report or suggest a fix"

Suggested change
#### Not an error, do NOT report suggest a fix
#### Not an error, do NOT report or suggest a fix

Copilot uses AI. Check for mistakes.

In file clients/java/src/main/java/io/lakefs/clients/sdk/AuthApi.java


```java
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
```

Do NOT comment
> Test is always false.

This is generated code, and there is no harm in this code.

#### Error, report and suggest a fix

If a generated file in clients/python contains code similar to this:

```py
sql_statement = s"SELECT $columns FROM $table LIMIT 1"
```

then it may be susceptible to SQL injection. Report it unless variables `column` and `table` are very clearly safe to use.
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent variable naming: The text refers to "variables column and table" but the code example uses $columns and $table. The variable name should be columns (plural) to match the code.

Suggested change
then it may be susceptible to SQL injection. Report it unless variables `column` and `table` are very clearly safe to use.
then it may be susceptible to SQL injection. Report it unless variables `columns` and `table` are very clearly safe to use.

Copilot uses AI. Check for mistakes.
Loading