ChartBoost / ruff-action

A GitHub Action for Ruff
Apache License 2.0
121 stars 21 forks source link

support ruff mode argument #19

Closed yosmoc closed 5 months ago

yosmoc commented 5 months ago

Related: https://github.com/ChartBoost/ruff-action/issues/11 This PR allows Users to specify the mode of ruff to be 'check' or 'format' using the mode input.

brucearctor commented 5 months ago

@yosmoc -- thanks! Looking at this now.

A question: mode means lots of things in different contexts. Is there an alternate, more narrowly descriptive word that would be possible to use? Mode might be acceptable, but wanting to spend a moment to consider alternatives. Please advise thoughts.

yosmoc commented 5 months ago

@yosmoc -- thanks! Looking at this now.

A question: mode means lots of things in different contexts. Is there an alternate, more narrowly descriptive word that would be possible to use? Mode might be acceptable, but wanting to spend a moment to consider alternatives. Please advise thoughts.

Thanks. How about these alternatives?

brucearctor commented 5 months ago

@yosmoc -- looking a bit closer: is there a reason the existing args doesn't suffice? I think you could place 'check' in that if desiring to check? If that indeed works, maybe we do not need an additional parameter, and could just update the docs?

yosmoc commented 5 months ago

@yosmoc -- looking a bit closer: is there a reason the existing args doesn't suffice? I think you could place 'check' in that if desiring to check? If that indeed works, maybe we do not need an additional parameter, and could just update the docs?

@brucearctor Sure! If we provide an example of ruff format in the documentation, that should be sufficient. A user normally runs ruff format with the --check option in ci, I believed it would be beneficial if the action automatically adds the --check option for the first time. (You also mentioned in here. https://github.com/ChartBoost/ruff-action/issues/11#issuecomment-1915712081 )

yosmoc commented 5 months ago

@brucearctor I reverted my original commit and updated the README file. Would you please check it again?