Skip to content

Improve the unusedDependencies lint rule to check for products targets #31

@marinofelipe

Description

@marinofelipe

Currently, the unusedDependencies lint rule, which comes out of the box with spmgraph, simply checks for usages that match a linked product dependency without checking the available targets that come with such product.

For most cases, it works just fine because it's common practice for products to have a single target that matches the product name, i.e.

.library(
   name: "FirebaseAuth",
   targets: ["FirebaseAuth"]
),

However, for products where either

  • The product name doesn't match the target; or
  • There are multiple targets available

The linter looks for imports of "$productName", so it wrongly considers it a failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions