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

Allow wildcards (globbing) #21

Closed
alexeagle opened this issue Nov 9, 2015 · 3 comments
Closed

Allow wildcards (globbing) #21

alexeagle opened this issue Nov 9, 2015 · 3 comments

Comments

@alexeagle
Copy link
Contributor

Currently, the gulp-clang-format plugin is our method to allow globbing all the files under a project.
If this fails (in checked-diff mode), it prints a command allowing us to re-format the correct files.

However, it's convenient to have a command-line which can be run to re-format everything in the project. The native clang-format binary doesn't support this (no way to expand nested directories in shell). But our wrapper could.

Then we could do something like
package.json: scripts: { 'format': 'clang-format -i' }
and npm run format would give the right versions and config for everything.

@mprobst
Copy link
Contributor

mprobst commented Nov 9, 2015

I recently changed gulp-clang-format to work by using the tree diff plugin. Part of that effort is that we can now clang-format entire trees in a gulp pipe. It should be reasonably easy to write a gulp task to format all files in the project.

But I agree, npm run clang-format would be nice, too.

@filipesilva
Copy link
Contributor

I've added a PR that enables globbing.

It's something I'd like to use for angular-cli without having to use gulp-clang-format.

@alexeagle
Copy link
Contributor Author

Now available in 1.0.35

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

No branches or pull requests

3 participants