formatter

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

formatter package defines a library for formatting Serulian source code.

Index

Constants

This section is empty.

Variables

View Source
var MAX_LINE_LENGTH = 80

Functions

func Format

func Format(path string, supportOlderSyntax bool, debug bool) bool

Format formats the source files at the given path.

func FormatSource

func FormatSource(source string) (string, error)

FormatSource formats the given Serulian source code.

func Freeze

func Freeze(path string, importPatterns []string, vcsDevelopmentDirectories []string, debug bool) bool

Freeze formats the source files at the given path and freezes the specified VCS import patterns.

func FreezeAt

func FreezeAt(path string, importPattern string, commitOrTag CommitOrTag, vcsDevelopmentDirectories []string, debug bool) bool

FreezeAt formats the source files at the given path and freezes the specified VCS import pattern at the given commit or tag.

func Unfreeze

func Unfreeze(path string, importPatterns []string, vcsDevelopmentDirectories []string, debug bool) bool

Unfreeze formats the source files at the given path and unfreezes the specified VCS import patterns.

func UnfreezeAt

func UnfreezeAt(path string, importPattern string, vcsDevelopmentDirectories []string, debug bool) bool

UnfreezeAt formats the source files at the given path and unfreezes the specified VCS import pattern.

func Update

func Update(path string, importPatterns []string, vcsDevelopmentDirectories []string, debug bool) bool

Update formats the source files at the given path and updates the specified VCS import patterns by moving forward their minor version, as per semvar.

func Upgrade

func Upgrade(path string, importPatterns []string, vcsDevelopmentDirectories []string, debug bool) bool

Upgrade formats the source files at the given path and upgrades the specified VCS import patterns by making them refer to the latest stable version, as per semvar.

Types

type CommitOrTag

type CommitOrTag struct {
	// contains filtered or unexported fields
}

CommitOrTag represents a commit SHA or a tag.

func Commit

func Commit(commitSha string) CommitOrTag

Commit returns a CommitOrTag representing a commit SHA.

func Tag

func Tag(tag string) CommitOrTag

Tag returns a CommitOrTag representing a tag.

Jump to

Keyboard shortcuts

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