stylize

command module
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Stylize circleci coveralls

Stylize quickly reformats or checkstyles an entire repository of code. It's a wrapper over other checkstyle programs such as clang-format or yapf that lets you use one command to operate on your entire repo, consisting of multiple types of files.

Usage

# install
go get -u github.com/justbuchanan/stylize

# check files and write a patch file to 'patch.txt'. This patch file shows what
# changes the formatter would have made if run with the `-i` (in-place) flag.
# You can also apply this generated patch to the repo using `git apply`.
stylize --patch_output patch.txt

# format all code in-place
# note: make a git commit before doing this - there's no undo button
stylize -i

# format code in place, excluding a couple directories
stylize -i --exclude=build,external

# reformat only files that differ from origin/master
stylize -i --git_diffbase origin/master

Configuration

By default, stylize looks for a config file named .stylize.yml in the current directory. A different file can be specified with the --config flag. See config.go for what options are available and see this repo's .stylize.yml file as an example.

Supported formatters

Stylize currently has support for:

Other formatters can easily be added. See the files in the 'formatters' directory as examples.

Python version

This project is a rewrite of the original stylize, which was written in python. Although it is no longer being developed, it's source code is available in the python branch of this repository.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址