From 4ccab82ca58c458bf779fecbc719140e892120fe Mon Sep 17 00:00:00 2001 From: EmmanuelMess Date: Mon, 22 Jun 2026 22:13:25 -0300 Subject: [PATCH] Add Github Copilot instructions --- .github/copilot-instructions.md | 23 +++++++++++++++++++ .../instructions/translations.instructions.md | 18 +++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/copilot-instructions.md create mode 100644 .github/instructions/translations.instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000..8adc00f8e --- /dev/null +++ b/.github/copilot-instructions.md @@ -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. + + + diff --git a/.github/instructions/translations.instructions.md b/.github/instructions/translations.instructions.md new file mode 100644 index 000000000..c6ee8ea9e --- /dev/null +++ b/.github/instructions/translations.instructions.md @@ -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 +""), the translations should keep the +character data markers, as it is needed for Android to parse the string +correctly. \ No newline at end of file