`flow cadence lint` lints imports

Open Beginner friendly
#2,326 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go
Domain
cli

Research direction

Start in internal/cadence/lint.go at findAllCadenceFiles and the call that passes "." when --base-dir is unset. Run flow cadence lint on a standard project layout containing cadence/ and imports/ to confirm the current discovery behavior. Done means the command lints project .cdc files without processing imported dependencies when no base directory is provided.

Written by the indexing model from the issue text.

Description

Bug Improvement

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.

Dominant language
Go
Stars
209
Forks
88
Avg merge
1d 17h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from onflow/flow-cli

All issues in onflow/flow-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.