-
Notifications
You must be signed in to change notification settings - Fork 31
Home
Arthur van de Vondervoort edited this page Nov 23, 2024
·
66 revisions
Welcome to the BusinessCentral.LinterCop wiki!
Here is an overview over all the rules with details and explaination:
- LC0000 - There was an error in an other Rule
- LC0001 - FlowFields should not be editable.
- LC0002 -
Commit()
needs a comment to justify its existence - LC0003 - Do not use an Object ID for properties or variable declarations
- LC0004 -
DrillDownPageId
andLookupPageId
must be filled - LC0005 - The casing of variable/method usage must align with the definition
- LC0006 - Fields with property
AutoIncrement
cannot be used in temporary table - LC0007 - Every table needs to specify a value for the
DataPerCompany
property - LC0008 - Filter operators should not be used in
SetRange
- LC0009 - Show info message about code metrics for each function or trigger
- LC0010 - Show warning about code metrics for each function or trigger
- LC0011 - Every object needs to specify a value for the
Access
property - LC0012 - Using hardcoded IDs in functions like
Codeunit.Run()
is not allowed - LC0013 -
NotBlank = true
on single field PKs - LC0014 - The Caption of permissionset objects should not exceed the maximum length.
- LC0015 - All application objects should be covered by at least one permission set in the extension.
- LC0016 - Check for missing Captions.
- LC0017 - Write to FlowFields should be explained by a comment.
- LC0018 - Events in internal codeunits are not accessible to extensions and should therefore be avoided.
- LC0019 - If Data Classification is set on the Table. Fields do not need the same classification.
- LC0020 - If Application Area is set on the TablePage. Controls do not need the same classification.
- LC0021 -
Confirm()
must be implemented through theConfirm Management
codeunit. - LC0022 -
GlobalLanguage()
must be implemented through theTranslation Helper
codeunit - LC0023 - Always provide fieldsgroups
DropDown
andBrick
on tables. - LC0024 - Procedure declaration should not end with semicolon.
- LC0025 - Procedure must be either local, internal or define a documentation comment.
- LC0026 - ToolTip must end with a dot.
- LC0027 - Utilize the
Page Management
codeunit for launching page - LC0028 - Event subscriber arguments now use identifier syntax instead of string literals.
- LC0029 - Use
CompareDateTime
method inType Helper
codeunit for DateTime variable comparisons. - LC0030 - Set Access property to
Internal
for Install/Upgrade codeunits. - LC0031 - Set
ReadIsolation
property instead ofLockTable()
method. - LC0032 - Clear(All) does not affect or change values for global variables in single instance codeunits.
- LC0033 - The specified runtime version in app.json is falling behind.
- LC0034 - The property
Extensible
should be explicitly set for public objects. - LC0035 - Explicitly set
AllowInCustomizations
for fields omitted on pages. - LC0036 - ToolTip must start with the verb "Specifies".
- LC0037 - Do not use line breaks in ToolTip.
- LC0038 - Try to not exceed 200 characters (including spaces).
- LC0039 - The given argument has a different type from the one expected.
- LC0040 - Explicitly set the
RunTrigger
parameter on build-in methods. - LC0041 - Empty Captions should be
Locked
. - LC0042 -
AutoCalcFields
should only be used for FlowFields or Blob fields. - LC0043 - Use
SecretText
type to protect credentials and sensitive textual values from being revealed. - LC0044 - TransferFields consistency between records.
- LC0045 - Zero (0)
Enum
value should be reserved for Empty Value. - LC0046 -
Label
with suffix Tok must be locked. - LC0047 - Locked
Label
must have a suffix Tok. - LC0048 - Use Error with a
ErrorInfo
orLabel
variable to improve telemetry details. - LC0049 -
SourceTable
property not defined on Page. - LC0050 -
SetFilter
with unsupported operator in filter expression. - LC0051 - Do not assign a text to a target with smaller size.
- LC0052 - The internal method is declared but never used.
- LC0053 - The internal method is only used in the object in which it is declared. Consider making the procedure local.
- LC0054 - Interface name must start with the capital 'I' without any spaces following it.
- LC0055 - The suffix
Tok
is meant to be used when the value of the label matches the name. - LC0056 - Empty Enum values should not have a specified
Caption
property. - LC0057 - Enum values must have non-empty a
Caption
to be selectable in the client. - LC0058 - PageVariable.SetRecord(): You cannot use a temporary record for the Record parameter.
- LC0059 - Single quote escaping issue detected.
- LC0060 - The
ApplicationArea
property is not applicable to API pages. - LC0061 - Pages of type API must have the
ODataKeyFields
property set to the SystemId field. - LC0062 - Mandatory field is missing on API page.
- LC0063 - Consider naming field with a more descriptive name.
- LC0064 - Missing ToolTip property on table field.
- LC0065 - Event subscriber var keyword mismatch.
- LC0066 - Duplicate ToolTip between page and table field.
- LC0067 - Set
NotBlank
property tofalse
when 'No. Series' TableRelation exists. - LC0068 - Informs the user that there are missing permission to access tabledata.
- LC0069 - Empty statements should be avoided.
- LC0070 - Zero index access on 1-based List objects.
- LC0071 - Incorrect
IsHandled
parameter assignment. - LC0072 - The documentation comment must match the procedure syntax.
- LC0073 - Handled parameters in event signatures should be passed by var.