@@ -276,46 +276,107 @@ Consider the :ref:`policies and tips for voting patches <gerrit-voting>`.
276276
277277.. _common-review-checks :
278278
279- Common code review checks
280- -------------------------
279+ Common code review checks / checklist
280+ -------------------------------------
281281
282282For reviewing and giving feedback, here's a couple of things that are often addressed. You can
283283use this list both for checking other people's patches, as well as your own.
284284
285- * Is the code-flow readable? Does it need more (or less) comments? Any code complexities
285+ .. _common-review-checks-general :
286+ General checks
287+ ~~~~~~~~~~~~~~
288+
289+ * Is the **code-flow readable **? Does it need more (or less) comments? Any **code complexities **
286290 ("cognitive complexity") that could be easier to read when using different conditions/loops/sub-methods?
287291* Do breaking changes occur that need to be noticed? This can also apply to:
288292
289- * Type Hinting
293+ * ** Type hinting / type declarations **
290294 * using PHP features beyond the supported PHP version
291295 * Loss of existing functionality
292296 * Typos
293297
294- * Are new class, method, function, variable names understandable
295- * Is there a need to add unit/functional testing for specific changes
296- * Are regression tests for a bugfix needed?
297- * Is the "Releases: " scope of a patch spanning the proper TYPO3 versions
298+ * Are new class, method, function, **variable names understandable **
299+ * Are possibilities for **early code returns ** and reduced **nesting levels ** addressed?
300+ * If **SCSS/TypeScript ** changes are involved, are the resulting build files included in
301+ the patch, and were built with the right environment?
302+
303+ .. _common-review-checks-testing :
304+ Testing
305+ ~~~~~~~
306+
307+ * Is there a need to add **unit/functional testing ** for specific changes
308+ * Are **regression tests ** for a bugfix needed?
309+
310+ .. _common-review-checks-formalities :
311+ Formalities
312+ ~~~~~~~~~~~
313+
314+ * Is the **"Releases: " scope ** of a patch spanning the proper TYPO3 versions
298315 (depending on the state of current LTS and priority-bugfix-only releases)
299- * Are the "final" and "private/protected" and "readonly" scopes of classes,
316+ * Does the **licensing ** of any foreign code introduced match the Core licensing?
317+ * Is the **commit message complete **, clear and properly mentions all part of a patch?
318+ * If a new Exception is added, is the timestamp-identifier unique and recent?
319+ * When **new PHP files ** are added, do they contain the TYPO3 License and a `declare strict_types ` header?
320+
321+ .. _common-review-checks-php :
322+ PHP specifics
323+ ~~~~~~~~~~~~~
324+
325+ * Are the **"final" and "private/protected" and "readonly" scopes ** of classes,
300326 methods and variables used properly?
301- * Is Dependency Injection used where applicable?
302- * Are possibilities for early code returns and reduced nesting levels addressed?
327+ * Is **Dependency Injection ** used where applicable?
328+
329+ .. _common-review-checks-docs :
330+ Documentation
331+ ~~~~~~~~~~~~~
332+
303333* If a change is Breaking or comes with a larger impact: Is
304- a "Breaking.rst" or "Important.rst" document part of the patch?
305- * If a patch is a new feature: Is a "Feature"-rst part of the patch? Check
306- out the `rst file generator <https://forger.typo3.com/utilities/rst> `
334+ a ** "Breaking.rst" or "Important.rst" ** document part of the patch?
335+ * If a patch is a new feature: Is a ** "Feature"-rst ** part of the patch? Check
336+ out the `rst file generator <https://forger.typo3.com/utilities/rst >`_
307337 for help on creating files like this.
308- * Does the licensing of any foreign code introduced match the Core licensing?
309- * Is the commit message complete, clear and properly mentions all part of a patch?
310- * If a new Exception is added, is the timestamp-identifier unique and recent?
311- * When new PHP files are added, do they contain the TYPO3 License and a `declare strict_types ` header?
312338* Is the provided commit message, reST files and the code itself aligned? Sometimes in the process
313339 of reworking a patch multiple times, these three place of documentation can become out of sync.
314- * If SCSS/TS changes are involved, are the resulting build files included in
315- the patch, and were built with the right environment?
316- * When changes are made to Xliff files, is the correct spelling in American (US) English used?
317- * Does your patch deprecate anything? If so, have you followed :ref: `deprecations `?
318-
319- If you feel this section is missing good things to watch out for for, please
340+ * Does your patch **deprecate ** anything? If so, have you followed :ref: `deprecations `?
341+
342+ .. _common-review-checks-xlf :
343+ Xliff / language files
344+ ~~~~~~~~~~~~~~~~~~~~~~
345+
346+ When changes are made to **Xliff files ** (translations):
347+
348+ * Is the **correct spelling ** in American (US) English used?
349+ * Does the file use **proper indentation levels and characters ** (tab)?
350+ * If an **existing ** language key is changed on a LTS branch, it must **NOT introduce new
351+ argument placeholders ** or remove existing ones, or change the meaning
352+ of an existing label. Instead, a new language key has to be
353+ introduced (and the old one can be removed or at least deprecated/documented as outdated).
354+ Otherwise, localization changes will be pushed to earlier TYPO3 versions
355+ and could cause PHP exceptions when **argument placeholders mismatch **.
356+ When labels are removed, translations will fall back to their english
357+ counterpart in prior patchlevel versions.
358+ * Removed language keys will only be removed in the TYPO3 major version
359+ scope where the change is committed to.
360+ * A language label must **only ** be removed in "main" versions, never
361+ backported to other branches. This would remove the label from
362+ translations of existing, non-updated TYPO3-setups of that version
363+ from the translation server downloads. Labels can only be removed
364+ if they have never been used in the any of the patchlevel releases
365+ that came before. Example: A language key that has been used in 13.4.1
366+ and then Fluid templates were changed in 13.4.10 (to not need the key
367+ anymore). Because of this, the key can **not ** be removed, because existing 13.4.1
368+ releases would then no longer contain the translation.
369+ * Any existing label change committed to `main ` will automatically update
370+ labels in ALL other TYPO3 versions, even if the TYPO3 Core repository
371+ does not backport the patch to earlier versions. Non-existing labels
372+ will not be included/updated of course. This is under the
373+ assumption, that existing label contents are only altered in terms
374+ of spelling/grammar, but **never change in meaning or arguments **.
375+
376+ .. _common-review-checks-missing :
377+ More?
378+ ~~~~~
379+
380+ If you feel this section is missing good things to watch out for, please
320381contribute to the documentation. This list does not claim to be complete, but
321- should act as a kind of "Cheat-Sheet" for reviewing.
382+ should act as a kind of "Cheat-Sheet" or checklist for reviewing.
0 commit comments