Remove / loosen the new rule AL0659 for enums
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
Please include the following with each issue:
1. Describe the bug
We've been refactoring a LOT of our 'option' fields / variables the past year into new 'enum' objects. However, when compiling against the new insider builds, a LOT of our new enums result in AL0659 warnings, forcing us to REMOVE these enums again and creating new enums (again) with shorter names.... and obsoleting lots of our new procedures :(
Can you please reconsider to make the rule less strict and allow enums with longer (30+) names, just as like it's supported today?
2. To Reproduce
Steps to reproduce the behavior:
- Create enum with long name (30+ chars)
enum 2002700 "NVT Invoicing Currency Based On"
{
Extensible = false;
value(0; Default)
{
Caption = 'Default';
}
value(1; "Service Currency")
{
Caption = 'Service Currency';
}
value(2; "Customer Currency")
{
Caption = 'Customer Currency';
}
}
Compile with C:\bcartifacts.cache\sandbox\ 19.0.29285.0 \VSIX\extension\bin\alc.exe
Warning
##[warning]Navitrans 365 Base Application: \Navitrans.Base\app\src\Base\ENUM Invoicing Currency Based On.al(1,14): warning AL0659: Length of the application object identifier 'NVT Invoicing Currency Based On' cannot exceed 30 characters This warning will become an error in a future release.
3. Expected behavior
Remove / loosen the new AL0659 rule
4. Actual behavior
5. Versions:
- AL Language:
- Visual Studio Code:
- Business Central:
- List of Visual Studio Code extensions that you have installed:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read CONTRIBUTING.MD, then reproduce the AL0659 warning with alc.exe 19.0.29285.0 using the long enum example in the issue. Trace where AL0659 is defined and enforced; done means the accepted name-length behavior is agreed and the example compiles without the warning under the intended rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- compilers, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100