-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
53 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
### citustools v0.1.0 (February 16, 2016) ### | ||
|
||
* Initial release | ||
|
||
* Adds scripts for Travis CI build workflows | ||
|
||
* Adds wrapper script to help apply Citus C style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export PACKAGE_NAME = citustools | ||
|
||
export prefix := /usr/local | ||
export bindir := $(prefix)/bin | ||
export datarootdir := $(prefix)/share | ||
export mandir := $(datarootdir)/man | ||
export sysconfdir := $(prefix)/etc | ||
export pkgsysconfdir := $(sysconfdir)/$(PACKAGE_NAME) | ||
|
||
# logic from http://stackoverflow.com/a/11206700 | ||
SUBDIRS := $(addsuffix /., uncrustify) | ||
TARGETS := all clean install | ||
SUBDIRS_TARGETS := $(foreach t,$(TARGETS),$(addsuffix $t,$(SUBDIRS))) | ||
|
||
.PHONY : $(TARGETS) $(SUBDIRS_TARGETS) | ||
|
||
$(TARGETS) : % : $(addsuffix %,$(SUBDIRS)) | ||
|
||
$(SUBDIRS_TARGETS) : | ||
$(MAKE) -C $(@D) $(@F:.%=%) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Uncrustify | ||
|
||
`citus_indent` wraps [`uncrustify`][1], a popular C source code beautifier. When invoked, it immediately applies Citus C style on any git-tracked C files under the current working directory, though a `--check` flag is implemented to check style without modifying any files. | ||
|
||
## Getting Started | ||
|
||
`citus_indent` requires `uncrustify` v0.60 or greater. | ||
|
||
`make install` to install the script, the Citus style configuration file, and a man page. `man citus_indent` for more details. | ||
|
||
## Usage | ||
|
||
Apply the `citus-style` git attribute to any files that need the Citus C style applied. After that, just ensure you're within the project's directory hierarchy and run `citus_indent` to format all files. Add style changes with `git add -p`. | ||
|
||
`citus_indent --check` is useful for scripts: it will not modify any files and simply exits with a non-zero status if any files marked with `citus-style` are non-compliant. | ||
|
||
[1]: http://uncrustify.sourceforge.net |