Added tags & categories + cleanup

This commit is contained in:
waldo1001 2022-02-24 14:45:35 +01:00
parent 4515a721bd
commit 5ee0436639
161 changed files with 295 additions and 34 deletions

View file

@ -1,6 +1,8 @@
+++
title = "Design"
weight = 490
tags = ["C/AL"]
categories = ["Best Practice"]
+++
## C/AL Coding Guidelines

View file

@ -1,6 +1,8 @@
+++
title = "By Reference Parameters"
weight = 280
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Do not declare parameters by reference if their values are not intended to be changed.

View file

@ -1,6 +1,8 @@
+++
title = "Class Coupling"
weight = 320
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Do not write functions that have high class coupling. This makes the code hard to maintain.

View file

@ -1,6 +1,8 @@
+++
title = "Cyclomatic Complexity"
weight = 460
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Do not write functions that have high cyclomatic complexity. This makes the code hard to maintain.

View file

@ -1,5 +1,7 @@
+++
title = "Encapsulate Local Functionality"
weight = 530
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Any function used local must be defined as local.

View file

@ -1,6 +1,8 @@
+++
title = "FINDSET FINDFIRST FINDLAST"
weight = 600
tags = ["C/AL"]
categories = ["Best Practice"]
+++
FINDSET, FIND('+') or FIND('-') should only be used when NEXT is used and vice versa.

View file

@ -1,6 +1,8 @@
+++
title = "Initialized Variables"
weight = 660
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Variables should always be set to a specific value, before they are used.

View file

@ -1,6 +1,8 @@
+++
title = "Maintainability Index"
weight = 770
tags = ["C/AL"]
categories = ["Best Practice"]
+++
[Maintainability Index][anchor0]: Do not write functions that have a very low maintainability index. This makes the code hard to maintain.

View file

@ -1,6 +1,8 @@
+++
title = "Parameter Placeholders"
weight = 920
tags = ["C/AL"]
categories = ["Best Practice"]
+++
The number of parameters passed to a string must match the placeholders.

View file

@ -1,6 +1,8 @@
+++
title = "Static Object Invocation"
weight = 1160
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Call objects statically whenever possible. It reduces extra noise and removes extra variables. Downside: changing the name of the object which is called statically will need a code update.

View file

@ -1,6 +1,8 @@
+++
title = "Unreachable Code"
weight = 1310
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Do not write code that will never be hit.

View file

@ -1,6 +1,8 @@
+++
title = "Unused Initialized Variables"
weight = 1320
tags = ["C/AL"]
categories = ["Best Practice"]
+++
The value assigned to a variable must be used. Else the variable is not necessary.

View file

@ -1,6 +1,8 @@
+++
title = "Unused Variables"
weight = 1330
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Do not declare variables that are unused.

View file

@ -1,6 +1,8 @@
+++
title = "Variable Capacity Mismatch"
weight = 1410
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Do not assign a value to a variable whose capacity is smaller.

View file

@ -1,6 +1,8 @@
+++
title = "WITH Scope Name Collision"
weight = 1450
tags = ["C/AL"]
categories = ["Best Practice"]
+++
Do not use the WITH scope when it has a variable whose name is the same as a local variable. This can lead to wrong code assumptions.