Skip to content

dnwe/gherkinfmt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gherkinfmt - Gherkin Formater

gherkinfmt is a command line tool to format .feature files which use the Gherkin language that drives Story/Feature based Behavior Driven Development.

gherkinfmt is written in golang and is just a frontend to the go-gherkin package which covers all the parsing and formating.

Install

Install from source

$ go install github.com/muhqu/gherkinfmt
...
$ gherkinfmt -version # verify install

Install binary

Grap a binary release from the releases section.

Usage

gherkinfmt OPTIONS

Formating Options
  -centersteps[=false]       control step alignment
  -nosteps[=false]           hide steps
  -nocomments[=false]        hide comments
  -noaligncomments[=false]   disable auto alignment of subsequent comments
  -mincommentindent=NUM      use min indent for aligned comments

IO Options
  -[no]color                 explicitly enable/disable colors
  -in PATH                   path to input file, defaults to stdin
  -out PATH                  path to output file, defaults to stdout

Misc Options
  -version                   version: ...
  -help                      this help

Examples

$ gherkinfmt -in path/to/some.feature
$ cat path/to/some.feature | gherkinfmt -centersteps

Thanks

Thanks to @peppe for the util package which is used to detect whether os.Stdout is a Terminal or not.

Thanks to @pointlander for the incredibble peg package, providing a Parser Expression Grammar Parser Generator. go-gherkin is implemented using peg.

Author

© 2014 by Mathias Leppich
github.com/muhqu, @muhqu

About

Command line tool to format `.feature` files which use the Gherkin language that drives Story/Feature based Behavior Driven Development.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 68.2%
  • Makefile 31.8%