Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AA0235 "When using 'OnInstallPerCompany' you should also add 'Company-Initialize'::'OnCompanyInitialize' event subscriber." - Not working #7269

Closed
3 tasks done
rvanbekkum opened this issue Dec 5, 2022 · 1 comment
Labels
CodeCop This is a specific static-code-analysis group (AA)

Comments

@rvanbekkum
Copy link

1. Describe the bug
Rule AA0235 does not work with the current latest AL Language extension.

2. To Reproduce
Steps to reproduce the behavior:

  1. Create a new AL project.
  2. Create a codeunit with Subtype = Install and add an implementation for the OnInstallAppPerCompany trigger, but do not add a subscriber for Company-Initialize'::'OnCompanyInitialize yet.
  3. AA0235 is not triggered.
codeunit 1160 "AP Install"
{
   Subtype = Install;

   trigger OnInstallAppPerCompany()
   begin
       Message('Hello World');
   end;
}

3. Expected behavior
Rule AA0235 is triggered if there is an implementation for the OnInstallAppPerCompany trigger, but no subscriber for Company-Initialize'::'OnCompanyInitialize yet.

4. Actual behavior
Rule AA0235 is NOT triggered when there is an implementation for the OnInstallAppPerCompany trigger, but no subscriber for Company-Initialize'::'OnCompanyInitialize yet.

5. Versions:

  • AL Language: v10.1.707468
  • Visual Studio Code: 1.73.1
  • Business Central: 21.1.48363.49889-W1
  • List of Visual Studio Code extensions that you have installed: N.A.

Final Checklist

Please remember to do the following:

  • Search the issue repository to ensure you are reporting a new issue

  • Reproduce the issue after disabling all extensions except the AL Language extension

  • Simplify your code around the issue to better isolate the problem

Additional References

@nndobrev nndobrev added CodeCop This is a specific static-code-analysis group (AA) requires-triage labels Dec 6, 2022
@thloke
Copy link
Contributor

thloke commented Jan 10, 2023

Thanks for reaching out. We’re focused on other things right now, but we’ve added this issue to our backlog. We’re planning to give the CodeCop engine and its rules an overhaul in a future major release. Thanks again!

@thloke thloke closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeCop This is a specific static-code-analysis group (AA)
Projects
None yet
Development

No branches or pull requests

3 participants