Skip to content

[apex] ApexUnitTestShouldNotUseSeeAllDataTrue violation range should only be the annotation and not the entire test method #5904

Closed

Description

@stephen-carter-at-sf

Rule: ApexUnitTestShouldNotUseSeeAllDataTrue

Description:

When running PMD against any apex test file that contains @isTest(seeAllData = true), then the ApexUnitTestShouldNotUseSeeAllDataTrue violation is found correctly, but its line and column information is the entire method. This makes for a very noisy experience inside of tools that integrate with PMD (like the Salesforce Code Analyzer VS Code Extension). Instead, this rule should give a range that is just the annotation.

Image

Activity

  1. added
    a:bug
    on Jul 14, 2025
  2. added this to the 7.27.0 milestone on Aug 8, 2026
  3. added a commit that references this issue on Aug 8, 2026
    2c829a3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions