Martijn Laan 1 mēnesi atpakaļ
vecāks
revīzija
102225c860
1 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  1. 5 4
      .github/instructions/pascal.instructions.md

+ 5 - 4
.github/instructions/pascal.instructions.md

@@ -3,7 +3,7 @@ applyTo: "**/*.pas, **/*.dpr, **/*.inc"
 ---
 # Coding conventions for Pascal source files
 - Always use inline variables instead of pre-declaring them at the start of the function.
-- Prefer inline constants over inline variables when the value is not expected to change.
+- Prefer inline constants over inline variables, even for run-time values and not just for compile-time constants.
 - Do not use with statements.
 - If and begin should be on the same line.
 - Else and begin should be on the same line.
@@ -13,9 +13,10 @@ applyTo: "**/*.pas, **/*.dpr, **/*.inc"
 - Mark read-only parameters as const.
 - Use Windows units first, then RTL/VCL units, then Components units, then Shared units, then project specific units.
 # Code review guidelines for Pascal source files
-- Do not suggest applying coding conventions to unchanged code.
-- Accept inline constants and do not suggest changing them to inline variables. For example, accept 'const I = J;' instead of suggesting 'var I := J;'.
+- All errors must be checked. Installers should be reliable above all.
 - Code must be compatible with Delphi 10.4 Sydney and later.
 - Code must be compatible with 32-bit and 64-bit builds.
-- All errors must be checked. Installers should be reliable above all.
+- Code must be compatible with Windows 7 and later.
+- Do not suggest applying coding conventions to unchanged code.
+- Do not suggest changing an inline constant to an inline variable.
 - Do not nitpick, especially not about readability or subjective matters.