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

馃搸 New --changed argument #4453

Open
ematipico opened this issue May 9, 2023 · 2 comments 路 May be fixed by #4743
Open

馃搸 New --changed argument #4453

ematipico opened this issue May 9, 2023 · 2 comments 路 May be fixed by #4743
Labels
A-CLI Area: CLI A-Project Area: project configuration and loading Help wanted Help would be really appreciated I-Normal Implementation: normal understanding of the tool and awareness
Milestone

Comments

@ematipico
Copy link
Contributor

ematipico commented May 9, 2023

Description

Rome now has support for VCS, which means that we can unlock new features that make the life of developers easier!

One of these features is the addition of a new argument called --changed to the CLI. When we pass this argument, Rome will execute check/format/etc. only to those files that were changed.

Technical details

I am still determining the implementation of this argument. There are two alternatives:

  1. execute the command via Command, we pass the proper arguments to the git program, and we read the output that was generated. Although I don't know yet what's the correct command/arguments to get an accurate output
  2. Use the crate git2. While this crate is phenomenal, its size is not small (207kb)

What do you guys think?

@ematipico ematipico added Help wanted Help would be really appreciated A-CLI Area: CLI A-Project Area: project configuration and loading labels May 9, 2023
@ematipico ematipico added this to the v12.2.0 milestone May 9, 2023
@Conaclos
Copy link
Contributor

Conaclos commented May 9, 2023

One issue I see is that a user could expect to apply the linter/checker only on staged parts of the changed files, leaving unchecked the unstaged parts.

@ematipico
Copy link
Contributor Author

One issue I see is that a user could expect to apply the linter/checker only on staged parts of the changed files, leaving unchecked the unstaged parts.

We wouldn't care about "what" changed in a file. We would only care about if it's changed. Even adding a white space or a new line would count as changed file, and we would need to check it ALL.

@ematipico ematipico added the I-Normal Implementation: normal understanding of the tool and awareness label May 23, 2023
@ematipico ematipico linked a pull request Jul 31, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-CLI Area: CLI A-Project Area: project configuration and loading Help wanted Help would be really appreciated I-Normal Implementation: normal understanding of the tool and awareness
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants