Giter VIP home page Giter VIP logo

perl6-perl6-tidy's Introduction

Build Status

NAME

Perl6::Tidy - Tidy Perl 6 source code according to your guidelines

SYNOPSIS

bin/perl6-tidy

Indents code to match simple tab style (mine in this case).

Choices of tab style include:
    'tab' (aka 1-true-brace-style or k-n-r)
    'Allman'
    'GNU'
    'Whitesmiths'
    'Horstmann'
    'Pico'
    'Ratliff'
    'Lisp'

# This *will* execute phasers such as BEGIN in your existing code.
# This may constitute a security hole, at least until the author figures
# out how to truly make the Perl 6 grammar standalone.

DESCRIPTION

Uses Perl6::Parser to parse your source into a Perl 6 data structure, then walks the data structure and prints it according to your format guidelines.

Indentation

Just as a reminder, here are quasi-formal names for common indentation styles.

'tab' - "One True Brace Style", "K&R":

while (x == y) {
    something();
    somethingelse();
}

Allman:

while (x == y)
{
    something();
    somethingelse();
}

GNU:

while (x == y)
{
    something();
    somethingelse();
}

Whitesmiths:

while (x == y)
  {
    something();
    somethingelse();
  }

Horstmann

while (x == y)
{   something();
    somethingelse();
}

Pico

while (x == y)
{   something();
    somethingelse(); }

Ratliff

while (x == y) {
    something();
    somethingelse();
    }

Lisp

while (x == y) {
    something();
    somethingelse(); }

Installation

  • Using zef (a module management tool bundled with Rakudo Star):
    zef update && zef install Perl6::Tidy

Testing

To run tests:

    prove -e perl6

Author

Jeffrey Goff, DrForr on #perl6, https://github.com/drforr/

License

Artistic License 2.0

perl6-perl6-tidy's People

Contributors

nbrown avatar drforr avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.