Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_cli): cli exit as error when no files are found #3722

Merged
merged 7 commits into from
Nov 17, 2022

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Nov 14, 2022

Summary

Closes #3645

This PR makes the cli exit as error if no files are found.

Test Plan

> cd c:\Python310
> rome check .
Checked 0 files in 79ms
Error: no supported files were found in the specified folders.
> $LASTEXITCODE
1

@xunilrj xunilrj requested a review from leops as a code owner November 14, 2022 11:30
@netlify
Copy link

netlify bot commented Nov 14, 2022

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit 877a32e
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/637627428e8135000859c3bf

Copy link
Contributor

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Could you please add a new test case so we can snapshot the error message?

crates/rome_cli/src/termination.rs Outdated Show resolved Hide resolved
@xunilrj xunilrj requested a review from a team November 15, 2022 19:42
@xunilrj xunilrj force-pushed the feature/error-nothing-is-found branch from c60eb08 to 3140398 Compare November 15, 2022 20:08
@xunilrj
Copy link
Contributor Author

xunilrj commented Nov 17, 2022

@leops I changed the semantic of the processed variable. Are you ok with this change?

@xunilrj
Copy link
Contributor Author

xunilrj commented Nov 17, 2022

Could you please add a new test case so we can snapshot the error message?

Done.

@xunilrj xunilrj force-pushed the feature/error-nothing-is-found branch from 9819961 to bd4a958 Compare November 17, 2022 12:08
@xunilrj xunilrj merged commit 062b100 into main Nov 17, 2022
@xunilrj xunilrj deleted the feature/error-nothing-is-found branch November 17, 2022 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📎 Exit with error if Rome finds no files
3 participants