Added tags & categories + cleanup
This commit is contained in:
parent
4515a721bd
commit
5ee0436639
161 changed files with 295 additions and 34 deletions
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Design"
|
||||
weight = 490
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
## C/AL Coding Guidelines
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unreachable Code"
|
||||
weight = 1310
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not write code that will never be hit.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unused Variables"
|
||||
weight = 1330
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not declare variables that are unused.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue