All Projects → rhysd → Gofmtrlx

rhysd / Gofmtrlx

Licence: bsd-3-clause
(a bit) relaxed gofmt

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Gofmtrlx

Sublime Jsfmt
jsfmt plugin for Sublime Text
Stars: ✭ 480 (+2185.71%)
Mutual labels:  formatter
Rufo
The Ruby Formatter
Stars: ✭ 691 (+3190.48%)
Mutual labels:  formatter
Translatedjs
Internationalization and localization for JavaScript and Node.js
Stars: ✭ 17 (-19.05%)
Mutual labels:  formatter
Input Mask Ios
User input masking library repo.
Stars: ✭ 494 (+2252.38%)
Mutual labels:  formatter
Ormolu
A formatter for Haskell source code
Stars: ✭ 592 (+2719.05%)
Mutual labels:  formatter
Sql Formatter
A whitespace formatter for different query languages
Stars: ✭ 779 (+3609.52%)
Mutual labels:  formatter
Unibeautify
One Beautifier to rule them all, One Beautifier to clean them, One Beautifier to bring them all and in the darkness sheen them
Stars: ✭ 466 (+2119.05%)
Mutual labels:  formatter
Vim Gofmt
Formats Go source code asynchronously with multiple Go formatters.
Stars: ✭ 11 (-47.62%)
Mutual labels:  formatter
Dprint
Pluggable and configurable code formatting platform written in Rust.
Stars: ✭ 610 (+2804.76%)
Mutual labels:  formatter
Go Money
Go implementation of Fowler's Money pattern
Stars: ✭ 887 (+4123.81%)
Mutual labels:  formatter
Typescript Formatter
Formatter of TypeScript code
Stars: ✭ 510 (+2328.57%)
Mutual labels:  formatter
Buildtools
A bazel BUILD file formatter and editor
Stars: ✭ 538 (+2461.9%)
Mutual labels:  formatter
Headwind
An opinionated Tailwind CSS class sorter built for Visual Studio Code
Stars: ✭ 789 (+3657.14%)
Mutual labels:  formatter
Globalize
A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
Stars: ✭ 4,612 (+21861.9%)
Mutual labels:  formatter
Moment.php
Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js
Stars: ✭ 900 (+4185.71%)
Mutual labels:  formatter
Fantomas
FSharp source code formatter
Stars: ✭ 475 (+2161.9%)
Mutual labels:  formatter
Prettier Atom
An atom package for the prettier formatter.
Stars: ✭ 750 (+3471.43%)
Mutual labels:  formatter
Vim Codefmt
Stars: ✭ 870 (+4042.86%)
Mutual labels:  formatter
Vim Clang Format
Vim plugin for clang-format, a formatter for C, C++, Obj-C, Java, JavaScript, TypeScript and ProtoBuf.
Stars: ✭ 837 (+3885.71%)
Mutual labels:  formatter
Online Markdown
A online markdown converter specially for Wechat Public formatting.
Stars: ✭ 812 (+3766.67%)
Mutual labels:  formatter

gofmtrlx: Relaxed gofmt

This is a fork of gofmt.

This project is being rebased continuously on original gofmt (as long as I'm using gofmtrlx).

What is a problem?

gofmt can't format a code which contains syntax error. For example,

package main

func main() {
	s := []int{
		1,
		2,
		3
	}
}

This code can't be formatted because there is no trailing comma at line 6.

How did gofmtrlx solve the problem?

Actually, Go's parser can parse this without bad AST node. So gofmt can format the code with fixing syntax error.

gofmtrlx ignores syntax error if there is no bad node in AST. In above code, gofmtrlx can fill up trailing comma on formatting it.

Installation and usage

go get -u github.com/rhysd/gofmtrlx

Usage is the same as gofmt command.

License

All codes are licensed the same license as original gofmt.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].