Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Makefile] Add format target #11420

Merged

Conversation

straight-shoota
Copy link
Member

This patch adds a format target to the Makefile. I've had this in my local Makefile for a while. I think it's useful to format code locally and having it applied to the correct locations. For example, we don't want to format the files in ./lib which are vendored in via git subtree.

We can already make use of the recipe in bin/ci format.

Makefile Show resolved Hide resolved
@straight-shoota straight-shoota added this to the 1.6.0 milestone Aug 14, 2022
@@ -25,6 +25,7 @@ verbose ?= ## Run specs in verbose mode
junit_output ?= ## Path to output junit results
static ?= ## Enable static linking
interpreter ?= ## Enable interpreter feature
check ?= ## Enable only check when running format
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd use some more explicit name here, like:

Suggested change
check ?= ## Enable only check when running format
formatter_check ?= ## Enable only check when running format

Copy link
Member Author

Choose a reason for hiding this comment

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

Na, that's just redundant. This flag only has a meaning for the format recipe.

@straight-shoota straight-shoota merged commit 63fbda5 into crystal-lang:master Aug 19, 2022
@straight-shoota straight-shoota deleted the feature/makefile-format branch August 19, 2022 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants