Add Github Copilot instructions

This commit is contained in:
EmmanuelMess
2026-06-22 22:13:25 -03:00
parent 62b9545647
commit 4ccab82ca5
2 changed files with 41 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
# Github Copilot guidelines for PR reviews
This file provides guidance for LLMs to review Amaze File Manager's pull
requests.
## Specific instructions
In this section are the specific instructions for special cases.
### try-catch structure
When writing a try-catch, in most cases, the catch should contain a specific
`Exception` subclass, meant to be caught at that point. The `Exception` caught
should be thrown by one of the functions called in the try clause. In some
cases, the catch has to be generic, for example when the catch has to prevent
`Exception`s from crashing a thread.
When catching an `OutOfMemoryError` the catch clause should make careful use
of memory, and should not instantiate new objects. For more information see
https://stackoverflow.com/q/24510188.
@@ -0,0 +1,18 @@
---
applyTo: "./app/src/*/res/values*/strings.xml"
---
# Github Copilot guidelines for translation reviews
This file provides guidance for LLMs to review Amaze File Manager's pull
requests that contain translation files.
The original files are in English, and translations should follow the original
intent, but translators have much leeway in how to express the original intent.
## Formatting
All translations should be formated in the same way as the original. One
particular case is translations enclosed in Character Data (starting with
"<![CDATA[" and ending with "]]>"), the translations should keep the
character data markers, as it is needed for Android to parse the string
correctly.