Skip to content

[Bug]: Code Analysis does not show alerts in PR if only custom cop warnings exist #2026

@PSchwamborn-AINO

Description

@PSchwamborn-AINO

AL-Go version

8.0 preview

Describe the issue

When I using custom code cops like the Linter Cop in Code Analysis the PR does not show any new warnings if they are only custom cop warnings. If there is at least one Microsoft Cop Warning the custom code cop warnings are shown corrrectly. But as soon as all Microsoft Cop Warnings are fixed the custom code cop warnings are also shown as fixed. Even if there was nothing changed.

Expected behavior

Custom Code Cop warnings should behave like Microsoft Cop Warnings.

Steps to reproduce

  1. Set up a custom code cop such as Lintercop in the “customCodeCops” property.
  2. Enable code analysis by setting “trackALAlertsInGitHub” to “true.”
  3. Ensure that CI/CD has been run to initialize alerts in the main branch.
  4. Create a PR and introduce a new Linter Cop alert -> No new alert is displayed in the PR ❌
  5. Introduce a new Microsoft Cop warning by new Commit and Push -> A new alert is displayed in the PR and, surprisingly, the LinterCop alert is also displayed ✅.
  6. Fix the Microsoft warning by new Commit and Push -> The Microsoft warning is shown as fixed, but the LinterCop warning is also shown as fixed ❌.

Additional context (logs, screenshots, etc.)

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions