Skip to content

flow cadence lint lints imports #2326

@holyfuchs

Description

@holyfuchs

Summary

flow cadence lint discovers .cdc files starting from . (the project root) when no --base-dir is provided. The standard Flow project layout puts own .cdc files in cadence/.
Linting from . causes the linter to process files it shouldn't — in particular, imports/.

Expected behavior

Don't lint imported dependencies.

Root cause

In internal/cadence/lint.go, findAllCadenceFiles is called with "." when --base-dir is not set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThe issue represents a bug, malfunction, regressionImprovementTechnical work without new features, refactoring, improving tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions