Skip to content

Conversation

quantumshiro
Copy link
Contributor

i fixed #1122

Changes

  • Add Clap default for Check’s path:
    • #[arg(default_value_t = default_project_path())]
  • Add default_project_path() helper using driver::files::find_project_root().unwrap_or(Utf8PathBuf::from(".")).
  • Only touches crates/fe/src/main.rs. No other logic or behavior changed.

Examples

  • fe check → checks current project
  • fe check ./contracts → checks given directory
  • fe check ./example.fe → checks given single file

Testing

  • Built successfully with cargo check -p fe.
  • Manual runs:
    • Repo root (non-project): shows missing fe.toml/src errors (expected).
    • Inside fixture project (crates/fe/tests/fixtures/cli_output/ingots/basic): success.
    • Inside src/ under the project: success (root auto-detected).

Copy link
Collaborator

@sbillig sbillig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sbillig sbillig merged commit 89a32d2 into argotorg:master Sep 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make fe check default to current directory when path is omitted
2 participants