drweb86 / Gherkin-Beautifier-VS-Code-Plugin

Gherkin Beautifier VS-Code Plugin
MIT License
0 stars 0 forks source link

Gherkin Beautifier VS Code Plugin

The multilingual plugin for Visual Studio Code that beautifies the Gherkin / Cucumber .feature files on saving them. Located at https://marketplace.visualstudio.com/items?itemName=siarheikuchuk.gherkin-beautifier-vs-code-plugin.

Demonstration of using this extension

Usage

Plugin will be invoked upon saving the .feature file.

Settings

You can put settings in the .workspace or .vscode file of your projects, so all your team will get them.

Indentation

Setting Description Default value
conf.view.indentSymbol What indentation symbol to use (tab or space) space
conf.view.identsBefore.Feature How many indentation symbols to insert before 'Feature' 0
conf.view.identsBefore.Rule How many indentation symbols to insert before 'Rule' 4
conf.view.identsBefore.Scenario How many indentation symbols to insert before 'Scenario' 8
conf.view.identsBefore.Examples How many indentation symbols to insert before 'Examples' 8
conf.view.identsBefore.Background How many indentation symbols to insert before 'Background' 8
conf.view.identsBefore.ScenarioOutline How many indentation symbols to insert before 'Scenario Outline' 8
conf.view.identsBefore.Given How many indentation symbols to insert before 'Given' 12
conf.view.identsBefore.When How many indentation symbols to insert before 'When' 13
conf.view.identsBefore.Then How many indentation symbols to insert before 'Then' 13
conf.view.identsBefore.And How many indentation symbols to insert before 'And' 14
conf.view.indentsBefore.Asterisk How many indentation symbols to insert before '*' 16
conf.view.indentsBefore.DocString How many indentation symbols to insert before doc string """ 18
conf.view.identsBefore.But How many indentation symbols to insert before 'But' 14
conf.view.identsBefore.Tag How many indentation symbols to insert before @ tags. Allowed values: amount of indentation chars or 'relative' relative
conf.view.identsBefore.Table How many indentation symbols to insert before 'Table' 18
conf.view.table.autoformat Enables table autoformatting true

Validation

Setting Description Default value
conf.view.validate.tags Validates if all tags are from allowed tags list and show warning messages upon saving feature files. How to specify tags? Example 1: @debug @important-component. Example 2: @debug, @important-component
conf.view.validate.tagsFile Validates if all tags are from allowed tags list and show warning messages upon saving feature files. List of tags is specified by file. In a file tags should go one per line. Path to file is resolved relative to workspace folder
gherkin-beautifier.validate.complainIfThenTextDontHaveThisWord Validates if phrase in 'then' part of script contains the specified keyword (for example 'should', like Then Apple should be eaten). If word is missing, a warning will be shown, but script will be saved

Non-Discrimination Statement

Gherkin Beautifier VS Code Plugin is not affilated with cucumber-js project and stands against any form of discrimination by race including but not limited to Belorussians and Russians.

Change log

Development

Running extension Press F5

Publishing npm i -g vsce@latest vsce package vsce publish

PAT generation

  1. https://dev.azure.com/SiarheiKuchuk/_usersSettings/tokens
  2. Click New Token
  3. Name should be 'gherkin-beautifier-vs-code-plugin'
  4. Organization should be 'All accessible organizations'
  5. Click Scopes \ Show all scopes \ Marketplace select Acquire+Publish,
  6. Click Create...
  7. vsce login 'siarheikuchuk'

Contributions

Love this extension? Star us!

Want to make this extension even more awesome? Send us your wish.

Hate how it is working? File an issue to us.