diff --git a/astyle-test-0.c b/astyle-test-0.c index e20c9858..45b86bf6 100644 --- a/astyle-test-0.c +++ b/astyle-test-0.c @@ -1,8 +1,9 @@ int Foo(bool isBar) - { +{ if (isBar) { bar(); - return 1; } + return 1; + } else return 0; } diff --git a/astyle-test-1.c b/astyle-test-1.c index f5680da2..df055a48 100644 --- a/astyle-test-1.c +++ b/astyle-test-1.c @@ -2,16 +2,16 @@ #include int main() { - FILE * pFile; - char buffer [100]; - pFile = fopen ("myfile.txt" , "r"); - if (pFile == NULL) perror ("Error opening file"); - else { - while ( ! feof (pFile) ) { - if ( fgets (buffer , 100 , pFile) == NULL ) break; - fputs (buffer , stdout); - } - fclose (pFile); - } - return 0; + FILE * pFile; + char buffer [100]; + pFile = fopen ("myfile.txt", "r"); + if (pFile == NULL) perror ("Error opening file"); + else { + while ( ! feof (pFile) ) { + if ( fgets (buffer, 100, pFile) == NULL ) break; + fputs (buffer, stdout); + } + fclose (pFile); + } + return 0; } diff --git a/autopep8-test-0.py b/autopep8-test-0.py index 9941de74..6451f038 100644 --- a/autopep8-test-0.py +++ b/autopep8-test-0.py @@ -1,9 +1,12 @@ -import math, sys; +import math +import sys + + def example1(): - ####This is a long comment. This should be wrapped to fit within 72 characters. - some_tuple=( 1,2, 3,'a' ); - some_variable={'long':'Long code lines should be wrapped within 79 characters.', - 'other':[math.pi, 100,200,300,9876543210,'This is a long string that goes on'], - 'more':{'inner':'This whole logical line should be wrapped.',some_tuple:[1, - 20,300,40000,500000000,60000000000000000]}} + # This is a long comment. This should be wrapped to fit within 72 characters. + some_tuple = (1, 2, 3, 'a') + some_variable = {'long': 'Long code lines should be wrapped within 79 characters.', + 'other': [math.pi, 100, 200, 300, 9876543210, 'This is a long string that goes on'], + 'more': {'inner': 'This whole logical line should be wrapped.', some_tuple: [1, + 20, 300, 40000, 500000000, 60000000000000000]}} return (some_tuple, some_variable) diff --git a/black-test-0.py b/black-test-0.py index 9941de74..ab602ed8 100644 --- a/black-test-0.py +++ b/black-test-0.py @@ -1,9 +1,22 @@ -import math, sys; +import math, sys + + def example1(): ####This is a long comment. This should be wrapped to fit within 72 characters. - some_tuple=( 1,2, 3,'a' ); - some_variable={'long':'Long code lines should be wrapped within 79 characters.', - 'other':[math.pi, 100,200,300,9876543210,'This is a long string that goes on'], - 'more':{'inner':'This whole logical line should be wrapped.',some_tuple:[1, - 20,300,40000,500000000,60000000000000000]}} + some_tuple = (1, 2, 3, "a") + some_variable = { + "long": "Long code lines should be wrapped within 79 characters.", + "other": [ + math.pi, + 100, + 200, + 300, + 9876543210, + "This is a long string that goes on", + ], + "more": { + "inner": "This whole logical line should be wrapped.", + some_tuple: [1, 20, 300, 40000, 500000000, 60000000000000000], + }, + } return (some_tuple, some_variable) diff --git a/brittany-test-0.hs b/brittany-test-0.hs index 169b4f85..198bd696 100644 --- a/brittany-test-0.hs +++ b/brittany-test-0.hs @@ -1,3 +1,3 @@ func (MyLongFoo abc def) = 1 -func (Bar a d) = 2 -func _ = 3 +func (Bar a d ) = 2 +func _ = 3 diff --git a/cabal-fmt-test-0.cabal b/cabal-fmt-test-0.cabal index b559f8ab..ea7be0fd 100644 --- a/cabal-fmt-test-0.cabal +++ b/cabal-fmt-test-0.cabal @@ -1,16 +1,26 @@ cabal-version: 2.4 -name: cabal-fmt -version: 0 +name: cabal-fmt +version: 0 -- An example formatter executable cabal-fmt - default-language: Haskell2010 - hs-source-dirs: src - main-is: CabalFmt.hs - -- build depends will be in - -- a nice tabular format - build-depends: base >=4.11 && <4.13, pretty >=1.1.3.6 && <1.2, bytestring, Cabal ^>=2.5, containers ^>=0.5.11.0 || ^>=0.6.0.1 - -- extensions will be sorted - other-extensions: - DeriveFunctor FlexibleContexts ExistentialQuantification OverloadedStrings - RankNTypes + default-language: Haskell2010 + hs-source-dirs: src + main-is: CabalFmt.hs + + -- build depends will be in + -- a nice tabular format + build-depends: + , base >=4.11 && <4.13 + , bytestring + , Cabal ^>=2.5 + , containers ^>=0.5.11.0 || ^>=0.6.0.1 + , pretty >=1.1.3.6 && <1.2 + + -- extensions will be sorted + other-extensions: + DeriveFunctor + ExistentialQuantification + FlexibleContexts + OverloadedStrings + RankNTypes diff --git a/clang-format-test-0.c b/clang-format-test-0.c index 85dec654..abf31d04 100644 --- a/clang-format-test-0.c +++ b/clang-format-test-0.c @@ -1,3 +1,3 @@ int formatted_code; - void unformatted_code ; +void unformatted_code; void formatted_code_again; diff --git a/cmake-format-test-0..cmake-format-test b/cmake-format-test-0..cmake-format-test index 7db69b75..360b7203 100644 --- a/cmake-format-test-0..cmake-format-test +++ b/cmake-format-test-0..cmake-format-test @@ -1,47 +1,49 @@ # The following multiple newlines should be collapsed into a single newline - - - cmake_minimum_required(VERSION 2.8.11) project(cmakelang_test) -# This multiline-comment should be reflowed -# into a single comment -# on one line +# This multiline-comment should be reflowed into a single comment on one line -# This comment should remain right before the command call. -# Furthermore, the command call should be formatted -# to a single line. -add_subdirectories(foo bar baz - foo2 bar2 baz2) +# This comment should remain right before the command call. Furthermore, the +# command call should be formatted to a single line. +add_subdirectories(foo bar baz foo2 bar2 baz2) # This very long command should be wrapped -set(HEADERS very_long_header_name_a.h very_long_header_name_b.h very_long_header_name_c.h) - -# This command should be split into one line per entry because it has a long argument list. -set(SOURCES source_a.cc source_b.cc source_d.cc source_e.cc source_f.cc source_g.cc source_h.cc) +set(HEADERS very_long_header_name_a.h very_long_header_name_b.h + very_long_header_name_c.h) + +# This command should be split into one line per entry because it has a long +# argument list. +set(SOURCES + source_a.cc + source_b.cc + source_d.cc + source_e.cc + source_f.cc + source_g.cc + source_h.cc) # The string in this command should not be split -set_target_properties(foo bar baz PROPERTIES COMPILE_FLAGS "-std=c++11 -Wall -Wextra") +set_target_properties(foo bar baz PROPERTIES COMPILE_FLAGS + "-std=c++11 -Wall -Wextra") # This command has a very long argument and can't be aligned with the command # end, so it should be moved to a new line with block indent + 1. -some_long_command_name("Some very long argument that really needs to be on the next line.") +some_long_command_name( + "Some very long argument that really needs to be on the next line.") -# This situation is similar but the argument to a KWARG needs to be on a -# newline instead. -set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-sign-compare -Wno-unused-parameter -xx") +# This situation is similar but the argument to a KWARG needs to be on a newline +# instead. +set(CMAKE_CXX_FLAGS + "-std=c++11 -Wall -Wno-sign-compare -Wno-unused-parameter -xx") -set(HEADERS header_a.h header_b.h # This comment should - # be preserved, moreover it should be split - # across two lines. +set(HEADERS + header_a.h header_b.h # This comment should be preserved, moreover it should + # be split across two lines. header_c.h header_d.h) - -# This part of the comment should -# be formatted -# but... +# This part of the comment should be formatted but... # cmake-format: off # This bunny should remain untouched: # .   _ ∩ @@ -49,8 +51,7 @@ set(HEADERS header_a.h header_b.h # This comment should #     (・x・) #    c( uu} # cmake-format: on -# while this part should -# be formatted again +# while this part should be formatted again # This is a paragraph # @@ -58,27 +59,42 @@ set(HEADERS header_a.h header_b.h # This comment should # # This is a third paragraph -# This is a comment -# that should be joined but +# This is a comment that should be joined but # TODO(josh): This todo should not be joined with the previous line. # NOTE(josh): Also this should not be joined with the todo. if(foo) -if(sbar) -# This comment is in-scope. -add_library(foo_bar_baz foo.cc bar.cc # this is a comment for arg2 - # this is more comment for arg2, it should be joined with the first. - baz.cc) # This comment is part of add_library - -other_command(some_long_argument some_long_argument) # this comment is very long and gets split across some lines - -other_command(some_long_argument some_long_argument some_long_argument) # this comment is even longer and wouldn't make sense to pack at the end of the command so it gets it's own lines + if(sbar) + # This comment is in-scope. + add_library( + foo_bar_baz + foo.cc bar.cc # this is a comment for arg2 this is more comment for arg2, + # it should be joined with the first. + baz.cc) # This comment is part of add_library + + other_command( + some_long_argument some_long_argument) # this comment is very long and + # gets split across some lines + + other_command( + some_long_argument some_long_argument some_long_argument) # this comment + # is even longer + # and wouldn't + # make sense to + # pack at the + # end of the + # command so it + # gets it's own + # lines + endif() endif() -endif() - # This very long command should be broken up along keyword arguments -foo(nonkwarg_a nonkwarg_b HEADERS a.h b.h c.h d.h e.h f.h SOURCES a.cc b.cc d.cc DEPENDS foo bar baz) +foo(nonkwarg_a nonkwarg_b + HEADERS a.h b.h c.h d.h e.h f.h + SOURCES a.cc b.cc d.cc + DEPENDS foo + bar baz) # This command uses a string with escaped quote chars foo(some_arg some_arg "This is a \"string\" within a string") diff --git a/dart-format-test-0.dart b/dart-format-test-0.dart index 791d1eb6..7bb9ba44 100644 --- a/dart-format-test-0.dart +++ b/dart-format-test-0.dart @@ -1,5 +1,6 @@ void example() { - if (tag=='style'||tag=='script'&&(type==null||type == TYPE_JS - ||type==TYPE_DART)|| - tag=='link'&&(rel=='stylesheet'||rel=='import')) {} + if (tag == 'style' || + tag == 'script' && + (type == null || type == TYPE_JS || type == TYPE_DART) || + tag == 'link' && (rel == 'stylesheet' || rel == 'import')) {} } diff --git a/dfmt-test-0.d b/dfmt-test-0.d index 9046affd..a271a55c 100644 --- a/dfmt-test-0.d +++ b/dfmt-test-0.d @@ -1,7 +1,5 @@ -void main(string[] args) { +void main(string[] args) +{ bool optionOne, optionTwo, optionThree; - getopt(args, - "optionOne", &optionOne, - "optionTwo", &optionTwo, - "optionThree", &optionThree); + getopt(args, "optionOne", &optionOne, "optionTwo", &optionTwo, "optionThree", &optionThree); } diff --git a/dhall-format-test-0.dhall b/dhall-format-test-0.dhall index 8902bb96..2874bd2b 100644 --- a/dhall-format-test-0.dhall +++ b/dhall-format-test-0.dhall @@ -1,9 +1,19 @@ let Fruit_ = < Apple : {} | Banana : {} | Orange : {} > -in let fruiteHandler_ = - { Apple = \(_ : {}) -> "Apple" - , Banana = \(_ : {}) -> "Banana" - , Orange = \(_ : {}) -> "Orange" - } - in let f = { Fruit = Fruit_, fruitToText = \(f : Fruit_) -> merge fruiteHandler_ f } - in let x = { fruit1 = f.fruitToText (f.Fruit.Apple {=}), fruit2 = f.fruitToText (f.Fruit.Banana {=}) } - in x // { fruit1 = f.fruitToText (f.Fruit.Orange {=}) } + +in let fruiteHandler_ = + { Apple = \(_ : {}) -> "Apple" + , Banana = \(_ : {}) -> "Banana" + , Orange = \(_ : {}) -> "Orange" + } + + in let f = + { Fruit = Fruit_ + , fruitToText = \(f : Fruit_) -> merge fruiteHandler_ f + } + + in let x = + { fruit1 = f.fruitToText (f.Fruit.Apple {=}) + , fruit2 = f.fruitToText (f.Fruit.Banana {=}) + } + + in x // { fruit1 = f.fruitToText (f.Fruit.Orange {=}) } diff --git a/dotnet-format-test-0.cs b/dotnet-format-test-0.cs index 85dec654..abf31d04 100644 --- a/dotnet-format-test-0.cs +++ b/dotnet-format-test-0.cs @@ -1,3 +1,3 @@ int formatted_code; - void unformatted_code ; +void unformatted_code; void formatted_code_again; diff --git a/dotnet-format-test-1.cs b/dotnet-format-test-1.cs index 85dec654..abf31d04 100644 --- a/dotnet-format-test-1.cs +++ b/dotnet-format-test-1.cs @@ -1,3 +1,3 @@ int formatted_code; - void unformatted_code ; +void unformatted_code; void formatted_code_again; diff --git a/elm-format-test-0.elm b/elm-format-test-0.elm index e4654af3..65d084f6 100644 --- a/elm-format-test-0.elm +++ b/elm-format-test-0.elm @@ -1,6 +1,20 @@ -homeDirectory = "/root/files" -eval boolean = case boolean of - Literal bool -> bool - Not b -> not (eval b) - And b b_ -> eval b && eval b_ - Or b b_ -> eval b || eval b_ +module Main exposing (..) + + +homeDirectory = + "/root/files" + + +eval boolean = + case boolean of + Literal bool -> + bool + + Not b -> + not (eval b) + + And b b_ -> + eval b && eval b_ + + Or b b_ -> + eval b || eval b_ diff --git a/fantomas-test-0.fs b/fantomas-test-0.fs index 262f7639..ae40459e 100644 --- a/fantomas-test-0.fs +++ b/fantomas-test-0.fs @@ -1,9 +1,9 @@ -type Type - = TyLam of Type * Type +type Type = + | TyLam of Type * Type | TyVar of string | TyCon of string * Type list - with override this.ToString () = - match this with - | TyLam (t1, t2) -> sprintf "(%s -> %s)" (t1.ToString()) (t2.ToString()) - | TyVar a -> a - | TyCon (s, ts) -> s + override this.ToString() = + match this with + | TyLam(t1, t2) -> sprintf "(%s -> %s)" (t1.ToString()) (t2.ToString()) + | TyVar a -> a + | TyCon(s, ts) -> s diff --git a/fantomas-test-1.fs b/fantomas-test-1.fs index 0f3c14c3..e222b392 100644 --- a/fantomas-test-1.fs +++ b/fantomas-test-1.fs @@ -1,9 +1,8 @@ -let Multiple9x9 () = +let Multiple9x9() = for i in 1 .. 9 do - printf "\n"; + printf "\n" for j in 1 .. 9 do - let k = i * j in - printf "%d x %d = %2d " i j k; - done; - done;; -Multiple9x9 ();; + let k = i * j + printf "%d x %d = %2d " i j k + +Multiple9x9() diff --git a/fourmolu-test-0.hs b/fourmolu-test-0.hs index b374b6ca..f2c6148e 100644 --- a/fourmolu-test-0.hs +++ b/fourmolu-test-0.hs @@ -1,5 +1,8 @@ -foo - :: MonadIO m - -> Text -> Text - -> SqlPersistT m () - foo = undefined +foo :: + MonadIO m -> + Text -> + Text -> + SqlPersistT + m + () + foo = undefined diff --git a/gn-test-0.gn b/gn-test-0.gn index ddbe86a6..32f81ca1 100644 --- a/gn-test-0.gn +++ b/gn-test-0.gn @@ -1 +1,4 @@ -sources = ["b", "a"] +sources = [ + "a", + "b", +] diff --git a/gofmt-test-0.go b/gofmt-test-0.go index 4f0ba6bc..90a431ca 100644 --- a/gofmt-test-0.go +++ b/gofmt-test-0.go @@ -1,13 +1,16 @@ package main - import "fmt" + +import "fmt" + // this is demo to format code - // with gofmt command - var a int=2; - var b int=5; - var c string= `hello world`; - func print(){ - fmt.Println("Value for a,b and c is : "); - fmt.Println(a); - fmt.Println((b)); - fmt.Println(c); - } +// with gofmt command +var a int = 2 +var b int = 5 +var c string = `hello world` + +func print() { + fmt.Println("Value for a,b and c is : ") + fmt.Println(a) + fmt.Println((b)) + fmt.Println(c) +} diff --git a/google-java-format-test-0.java b/google-java-format-test-0.java index dd9dfde9..756608de 100644 --- a/google-java-format-test-0.java +++ b/google-java-format-test-0.java @@ -1,6 +1,10 @@ private enum Answer { - YES { @Override public String toString() { return "yes"; + YES { + @Override + public String toString() { + return "yes"; } - }, NO, + }, + NO, MAYBE } diff --git a/hindent-test-0.hs b/hindent-test-0.hs index 08aded84..823b4bf9 100644 --- a/hindent-test-0.hs +++ b/hindent-test-0.hs @@ -1 +1,3 @@ -example = case x of Just p -> foo bar +example = + case x of + Just p -> foo bar diff --git a/hlint-test-0.hs b/hlint-test-0.hs index 89d45d5c..a7013166 100644 --- a/hlint-test-0.hs +++ b/hlint-test-0.hs @@ -1,2 +1,2 @@ main :: IO () -main = putStrLn $ "hello hlint" +main = putStrLn "hello hlint" diff --git a/isort-test-0.py b/isort-test-0.py index 5bd6f7fe..9d6689f4 100644 --- a/isort-test-0.py +++ b/isort-test-0.py @@ -1,20 +1,11 @@ -from my_lib import Object +from __future__ import absolute_import import os - -from my_lib import Object3 - -from my_lib import Object2 - import sys -from third_party import lib15, lib1, lib2, lib3, lib4, lib5, lib6, lib7, lib8, lib9, lib10, lib11, lib12, lib13, lib14 - -import sys - -from __future__ import absolute_import - -from third_party import lib3 +from my_lib import Object, Object2, Object3 +from third_party import (lib1, lib2, lib3, lib4, lib5, lib6, lib7, lib8, lib9, + lib10, lib11, lib12, lib13, lib14, lib15) print("Hey") print("yo") diff --git a/jdt-test-0.java b/jdt-test-0.java index c3123f97..6fafba6b 100644 --- a/jdt-test-0.java +++ b/jdt-test-0.java @@ -1,5 +1,5 @@ public class ShouldFormat1 { -int Foo(bool isBar) { + int Foo(bool isBar) { if (isBar) { bar(); return 1; diff --git a/jdt-test-1.java b/jdt-test-1.java index c7311a57..2df6745d 100644 --- a/jdt-test-1.java +++ b/jdt-test-1.java @@ -6,7 +6,8 @@ int Foo(bool isBar) { bar(); return 1; - } else + } else return 0; - }} + } +} diff --git a/jq-test-0.json b/jq-test-0.json index 505a1edb..996709dc 100644 --- a/jq-test-0.json +++ b/jq-test-0.json @@ -1,4 +1,4 @@ { - "foo": "bar" - , "baz": - "bat" } + "foo": "bar", + "baz": "bat" +} diff --git a/luaformatter-test-0.lua b/luaformatter-test-0.lua index efbed146..78aba65f 100644 --- a/luaformatter-test-0.lua +++ b/luaformatter-test-0.lua @@ -1,4 +1 @@ -matrix = { {1, 0, 0, 0}, - {1, 1, 0, 0}, - {1, 1, 1, 0}, - {1, 1, 1, 1} } +matrix = {{1, 0, 0, 0}, {1, 1, 0, 0}, {1, 1, 1, 0}, {1, 1, 1, 1}} diff --git a/nixpkgs-fmt-test-0.nix b/nixpkgs-fmt-test-0.nix index 965c7798..0c301071 100644 --- a/nixpkgs-fmt-test-0.nix +++ b/nixpkgs-fmt-test-0.nix @@ -1,2 +1,2 @@ -{foo,bar}: - foo+bar +{ foo, bar }: +foo + bar diff --git a/npm-groovy-lint-test-0.groovy b/npm-groovy-lint-test-0.groovy index 160f5fc0..c90a8a83 100644 --- a/npm-groovy-lint-test-0.groovy +++ b/npm-groovy-lint-test-0.groovy @@ -1,20 +1,20 @@ -def variable = 1; +def variable = 1 pipeline { agent any - options{ timestamps() } - stages{ stage('') { + options { timestamps() } + stages { stage('') { steps { - sh """ - """ + sh ''' + ''' } - } + } stage('Deploy') { steps { ansiColor('xterm') { - sh """ - """ + sh ''' + ''' } } } } } diff --git a/ocamlformat-test-0.ml b/ocamlformat-test-0.ml index b46adce4..5ac0b594 100644 --- a/ocamlformat-test-0.ml +++ b/ocamlformat-test-0.ml @@ -1,4 +1,3 @@ let sum_of_squares num = - num + 1 - |> List.range 0 |> List.map ~f:square + num + 1 |> List.range 0 |> List.map ~f:square |> List.fold_left ~init:0 ~f:( + ) diff --git a/ormolu-test-0.hs b/ormolu-test-0.hs index b374b6ca..39cb30df 100644 --- a/ormolu-test-0.hs +++ b/ormolu-test-0.hs @@ -1,5 +1,8 @@ -foo - :: MonadIO m - -> Text -> Text - -> SqlPersistT m () - foo = undefined +foo :: + MonadIO m -> + Text -> + Text -> + SqlPersistT + m + () + foo = undefined diff --git a/perltidy-test-0.pl b/perltidy-test-0.pl index 547a9eaa..3bdd210c 100644 --- a/perltidy-test-0.pl +++ b/perltidy-test-0.pl @@ -1,7 +1,7 @@ -my $lines = 0; # checksum: #lines -my $bytes = 0; # checksum: #bytes -my $sum = 0; # checksum: system V sum -my $patchdata = 0; # saw patch data -my $pos = 0; # start of patch data -my $endkit = 0; # saw end of kit -my $fail = 0; # failed +my $lines = 0; # checksum: #lines +my $bytes = 0; # checksum: #bytes +my $sum = 0; # checksum: system V sum +my $patchdata = 0; # saw patch data +my $pos = 0; # start of patch data +my $endkit = 0; # saw end of kit +my $fail = 0; # failed diff --git a/perltidy-test-1.pl b/perltidy-test-1.pl index 2a865663..54390e78 100644 --- a/perltidy-test-1.pl +++ b/perltidy-test-1.pl @@ -1,10 +1,14 @@ -$_= <<'EOL'; +$_ = <<'EOL'; $url = new URI::URL "http://www/"; die if $url eq "xXx"; EOL -LOOP:{print(" digits"),redo LOOP if/\G\d+\b[,.;]?\s*/gc;print(" lowercase"), -redo LOOP if/\G[a-z]+\b[,.;]?\s*/gc;print(" UPPERCASE"),redo LOOP -if/\G[A-Z]+\b[,.;]?\s*/gc;print(" Capitalized"), -redo LOOP if/\G[A-Z][a-z]+\b[,.;]?\s*/gc; -print(" MiXeD"),redo LOOP if/\G[A-Za-z]+\b[,.;]?\s*/gc;print( -" alphanumeric"),redo LOOP if/\G[A-Za-z0-9]+\b[,.;]?\s*/gc;print(" line-noise" -),redo LOOP if/\G[^A-Za-z0-9]+/gc;print". That's all!\n";} +LOOP: { + print(" digits"), redo LOOP if /\G\d+\b[,.;]?\s*/gc; + print(" lowercase"), redo LOOP if /\G[a-z]+\b[,.;]?\s*/gc; + print(" UPPERCASE"), redo LOOP + if /\G[A-Z]+\b[,.;]?\s*/gc; + print(" Capitalized"), redo LOOP if /\G[A-Z][a-z]+\b[,.;]?\s*/gc; + print(" MiXeD"), redo LOOP if /\G[A-Za-z]+\b[,.;]?\s*/gc; + print(" alphanumeric"), redo LOOP if /\G[A-Za-z0-9]+\b[,.;]?\s*/gc; + print(" line-noise"), redo LOOP if /\G[^A-Za-z0-9]+/gc; + print ". That's all!\n"; +} diff --git a/perltidy-test-2.pl b/perltidy-test-2.pl index 2e52d957..8dedf0f2 100644 --- a/perltidy-test-2.pl +++ b/perltidy-test-2.pl @@ -1,3 +1,8 @@ -%unitscale=("in",72,"pt",72.27/72,"pc",12,"mm",72/25.4,"cm",72/2.54, -"\\hsize",100,"\\vsize",100,"\\textwidth",100,"\\textheight",100, -"\\pagewidth",100,"\\linewidth",100); +%unitscale = ( + "in", 72, "pt", 72.27 / 72, + "pc", 12, "mm", 72 / 25.4, + "cm", 72 / 2.54, "\\hsize", 100, + "\\vsize", 100, "\\textwidth", 100, + "\\textheight", 100, "\\pagewidth", 100, + "\\linewidth", 100 +); diff --git a/perltidy-test-3.pl b/perltidy-test-3.pl index 63aa5a5b..3e52e82d 100644 --- a/perltidy-test-3.pl +++ b/perltidy-test-3.pl @@ -1,4 +1,8 @@ -my $a_box = [ [ $a11, $a12, $a13, $a14, $a15, $a16 ], -[ $a21, $a22, $a23, $a24, $a25, $a26 ], [ $a31, $a32, $a33, $a34, $a35, $a36 ], -[ $a41, $a42, $a43, $a44, $a45, $a46 ], [ $a51, $a52, $a53, $a54, $a55, $a56 ], - [ $a61, $a62, $a63, $a64, $a65, $a66 ], ]; +my $a_box = [ + [ $a11, $a12, $a13, $a14, $a15, $a16 ], + [ $a21, $a22, $a23, $a24, $a25, $a26 ], + [ $a31, $a32, $a33, $a34, $a35, $a36 ], + [ $a41, $a42, $a43, $a44, $a45, $a46 ], + [ $a51, $a52, $a53, $a54, $a55, $a56 ], + [ $a61, $a62, $a63, $a64, $a65, $a66 ], +]; diff --git a/perltidy-test-4.pl b/perltidy-test-4.pl index 2f427ade..b4968c34 100644 --- a/perltidy-test-4.pl +++ b/perltidy-test-4.pl @@ -1,8 +1,45 @@ -%TV=(flintstones=>{series=>"flintstones",nights=>[qw(monday thursday friday)], -members=>[{name=>"fred",role=>"lead",age=>36,},{name=>"wilma",role=>"wife", -age=>31,},{name=>"pebbles",role=>"kid",age=>4,},],},jetsons=>{series=>"jetsons", -nights=>[qw(wednesday saturday)],members=>[{name=>"george",role=>"lead",age=>41, -},{name=>"jane",role=>"wife",age=>39,},{name=>"elroy",role=>"kid",age=>9,},],}, -simpsons=>{series=>"simpsons",nights=>[qw(monday)],members=>[{name=>"homer", -role=>"lead",age=>34,},{name=>"marge",role=>"wife",age=>37,},{name=>"bart", -role=>"kid",age=>11,},],},); +%TV = ( + flintstones => { + series => "flintstones", + nights => [qw(monday thursday friday)], + members => [ + { name => "fred", role => "lead", age => 36, }, + { + name => "wilma", + role => "wife", + age => 31, + }, + { name => "pebbles", role => "kid", age => 4, }, + ], + }, + jetsons => { + series => "jetsons", + nights => [qw(wednesday saturday)], + members => [ + { + name => "george", + role => "lead", + age => 41, + }, + { name => "jane", role => "wife", age => 39, }, + { name => "elroy", role => "kid", age => 9, }, + ], + }, + simpsons => { + series => "simpsons", + nights => [qw(monday)], + members => [ + { + name => "homer", + role => "lead", + age => 34, + }, + { name => "marge", role => "wife", age => 37, }, + { + name => "bart", + role => "kid", + age => 11, + }, + ], + }, +); diff --git a/perltidy-test-5.pl b/perltidy-test-5.pl index efd666ab..d490e123 100644 --- a/perltidy-test-5.pl +++ b/perltidy-test-5.pl @@ -1,45 +1,62 @@ { L9140: - if ($msccom::obj==$msccom::food) { - goto L8142; - } - if ($msccom::obj==$msccom::bird||$msccom::obj==$msccom::snake||$msccom::obj==$msccom::clam||$msccom::obj==$msccom::oyster||$msccom::obj==$msccom::dwarf||$msccom::obj==$msccom::dragon||$msccom::obj==$msccom::troll||$msccom::obj==$msccom::bear) { - $msccom::spk=71; - } - goto L2011; - # - # DRINK. IF NO OBJECT, ASSUME WATER AND LOOK FOR IT HERE. IF WATER IS - # THE BOTTLE, DRINK THAT, ELSE MUST BE AT A WATER LOC, SO DRINK STREAM. - # + if ( $msccom::obj == $msccom::food ) { + goto L8142; + } + if ( $msccom::obj == $msccom::bird + || $msccom::obj == $msccom::snake + || $msccom::obj == $msccom::clam + || $msccom::obj == $msccom::oyster + || $msccom::obj == $msccom::dwarf + || $msccom::obj == $msccom::dragon + || $msccom::obj == $msccom::troll + || $msccom::obj == $msccom::bear ) + { + $msccom::spk = 71; + } + goto L2011; + # + # DRINK. IF NO OBJECT, ASSUME WATER AND LOOK FOR IT HERE. IF WATER IS + # THE BOTTLE, DRINK THAT, ELSE MUST BE AT A WATER LOC, SO DRINK STREAM. + # L9150: - if ($msccom::obj==0&&$liqloc->($placom::loc)!=$msccom::water&&($liq->(0)!=$msccom::water||!$here->($msccom::bottle))) { - goto L8000; - } - if ($msccom::obj!=0&&$msccom::obj!=$msccom::water) { - $msccom::spk=110; - } - if ($msccom::spk==110||$liq->(0)!=$msccom::water||!$here->($msccom::bottle)) { - goto L2011; - } - $placom::prop->($msccom::bottle)=1; - $placom::place->($msccom::water)=0; - $msccom::spk=74; - goto L2011; - # - # RUB. YIELDS VARIOUS SNIDE REMARKS. - # + if ( $msccom::obj == 0 + && $liqloc->($placom::loc) != $msccom::water + && ( $liq->(0) != $msccom::water || !$here->($msccom::bottle) ) ) + { + goto L8000; + } + if ( $msccom::obj != 0 && $msccom::obj != $msccom::water ) { + $msccom::spk = 110; + } + if ( $msccom::spk == 110 + || $liq->(0) != $msccom::water + || !$here->($msccom::bottle) ) + { + goto L2011; + } + $placom::prop->($msccom::bottle) = 1; + $placom::place->($msccom::water) = 0; + $msccom::spk = 74; + goto L2011; + # + # RUB. YIELDS VARIOUS SNIDE REMARKS. + # L9160: - if ($msccom::obj!=$placom::lamp) { - $msccom::spk=76; - } - goto L2011; - # - # THROW. SAME AS DISCARD UNLESS AXE. THEN SAME AS ATTACK EXCEPT IGNOR - # AND IF DWARF IS PRESENT THEN ONE MIGHT BE KILLED. (ONLY WAY TO DO SO - # AXE ALSO SPECIAL FOR DRAGON, BEAR, AND TROLL. TREASURES SPECIAL FOR - # + if ( $msccom::obj != $placom::lamp ) { + $msccom::spk = 76; + } + goto L2011; + # + # THROW. SAME AS DISCARD UNLESS AXE. THEN SAME AS ATTACK EXCEPT IGNOR + # AND IF DWARF IS PRESENT THEN ONE MIGHT BE KILLED. (ONLY WAY TO DO SO + # AXE ALSO SPECIAL FOR DRAGON, BEAR, AND TROLL. TREASURES SPECIAL FOR + # L9170: - if ($toting->($msccom::rod2)&&$msccom::obj==$msccom::rod&&!$toting->($msccom::rod)) { - $msccom::obj=$msccom::rod2; - } - } + if ( $toting->($msccom::rod2) + && $msccom::obj == $msccom::rod + && !$toting->($msccom::rod) ) + { + $msccom::obj = $msccom::rod2; + } +} diff --git a/pg_format-test-0.sql b/pg_format-test-0.sql index d4cb6663..71d12ccd 100644 --- a/pg_format-test-0.sql +++ b/pg_format-test-0.sql @@ -1,3 +1,7 @@ -SELECT * from -students -WHERE students.age > 10; +SELECT + * +FROM + students +WHERE + students.age > 10; + diff --git a/php-cs-fixer-test-0.php b/php-cs-fixer-test-0.php index c7ca2e5c..e55c606f 100644 --- a/php-cs-fixer-test-0.php +++ b/php-cs-fixer-test-0.php @@ -1,2 +1,3 @@ -foo(); diff --git a/prettier-json-test-0.json b/prettier-json-test-0.json index 505a1edb..996709dc 100644 --- a/prettier-json-test-0.json +++ b/prettier-json-test-0.json @@ -1,4 +1,4 @@ { - "foo": "bar" - , "baz": - "bat" } + "foo": "bar", + "baz": "bat" +} diff --git a/prettier-markdown-test-0.md b/prettier-markdown-test-0.md index 5592b2c5..49b77c2b 100644 --- a/prettier-markdown-test-0.md +++ b/prettier-markdown-test-0.md @@ -1 +1,10 @@ -Voilà! In view, a humble vaudevillian veteran cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valourous visitation of a bygone vexation stands vivified and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition! The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honour to meet you and you may call me V. +Voilà! In view, a humble vaudevillian veteran cast vicariously as both victim +and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, +is a vestige of the vox populi, now vacant, vanished. However, this valourous +visitation of a bygone vexation stands vivified and has vowed to vanquish these +venal and virulent vermin vanguarding vice and vouchsafing the violently vicious +and voracious violation of volition! The only verdict is vengeance; a vendetta +held as a votive, not in vain, for the value and veracity of such shall one day +vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage +veers most verbose, so let me simply add that it's my very good honour to meet +you and you may call me V. diff --git a/prettier-ruby-test-0.rb b/prettier-ruby-test-0.rb index cda89b3d..3bf1506f 100644 --- a/prettier-ruby-test-0.rb +++ b/prettier-ruby-test-0.rb @@ -1,13 +1,18 @@ - d=[30644250780,9003106878, - 30636278846,66641217692,4501790980, -671_24_603036,131_61973916,66_606629_920, - 30642677916,30643069058];a,s=[],$*[0] - s.each_byte{|b|a<<("%036b"%d[b. - chr.to_i]).scan(/\d{6}/)} - a.transpose.each{ |a| - a.join.each_byte{\ - |i|print i==49?\ - ($*[1]||"#")\ - :32.chr} - puts - } +d = [ + 30_644_250_780, + 9_003_106_878, + 30_636_278_846, + 66_641_217_692, + 4_501_790_980, + 671_24_603036, + 131_61973916, + 66_606629_920, + 30_642_677_916, + 30_643_069_058 +] +a, s = [], $*[0] +s.each_byte { |b| a << ("%036b" % d[b.chr.to_i]).scan(/\d{6}/) } +a.transpose.each do |a| + a.join.each_byte { |i| print i == 49 ? ($*[1] || "#") : 32.chr } + puts +end diff --git a/prettier-test-0.js b/prettier-test-0.js index 430121c6..811d19cb 100644 --- a/prettier-test-0.js +++ b/prettier-test-0.js @@ -1,5 +1 @@ -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) +matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); diff --git a/prettier-test-1.js b/prettier-test-1.js index 430121c6..811d19cb 100644 --- a/prettier-test-1.js +++ b/prettier-test-1.js @@ -1,5 +1 @@ -matrix( - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 -) +matrix(1, 0, 0, 0, 1, 0, 0, 0, 1); diff --git a/prettier-yaml-test-0.yaml b/prettier-yaml-test-0.yaml index 5f47e963..015be9a2 100644 --- a/prettier-yaml-test-0.yaml +++ b/prettier-yaml-test-0.yaml @@ -1,2 +1,2 @@ foo: bar -baz: bat +baz: bat diff --git a/purty-test-0.purs b/purty-test-0.purs index fbe3f78d..b5a2daf9 100644 --- a/purty-test-0.purs +++ b/purty-test-0.purs @@ -1,7 +1,8 @@ module Ado where foo = ado - let w = 0 + let + w = 0 x <- pure 1 y <- do pure 2 diff --git a/pyment-test-0.py b/pyment-test-0.py index 8fee932a..703aaad0 100644 --- a/pyment-test-0.py +++ b/pyment-test-0.py @@ -1,20 +1,23 @@ def func(param1=True, param2: str = 'default val'): - '''Description of func with docstring groups style. + """Description of func with docstring groups style. - Params: - param1 - descr of param1 that has True for default value. - param2 - descr of param2 + :param param1: descr of param1 that has True for default value + :param param2: descr of param2 + :param param2: str: (Default value = 'default val') + :returns: some value + :raises keyError: raises key exception + :raises TypeError: raises type exception - Returns: - some value - - Raises: - keyError: raises key exception - TypeError: raises type exception - - ''' + """ pass class A: + """ """ def method(self, param1, param2=None) -> int: + """ + + :param param1: + :param param2: (Default value = None) + + """ pass diff --git a/pyment-test-1.py b/pyment-test-1.py index 8fee932a..703aaad0 100644 --- a/pyment-test-1.py +++ b/pyment-test-1.py @@ -1,20 +1,23 @@ def func(param1=True, param2: str = 'default val'): - '''Description of func with docstring groups style. + """Description of func with docstring groups style. - Params: - param1 - descr of param1 that has True for default value. - param2 - descr of param2 + :param param1: descr of param1 that has True for default value + :param param2: descr of param2 + :param param2: str: (Default value = 'default val') + :returns: some value + :raises keyError: raises key exception + :raises TypeError: raises type exception - Returns: - some value - - Raises: - keyError: raises key exception - TypeError: raises type exception - - ''' + """ pass class A: + """ """ def method(self, param1, param2=None) -> int: + """ + + :param param1: + :param param2: (Default value = None) + + """ pass diff --git a/refmt-test-0.re b/refmt-test-0.re index 6d2f98a8..bf5aaf8b 100644 --- a/refmt-test-0.re +++ b/refmt-test-0.re @@ -1,11 +1,12 @@ -type schoolPerson = Teacher - | Director | Student(string); +type schoolPerson = + | Teacher + | Director + | Student(string); let greeting = person => - switch (person){ - | Teacher => "Hey Professor!" - | Director => "Hello Director." - | Student("Richard") => "Still here Ricky?" - | Student(anyOtherName) => "Hey, " ++ anyOtherName - ++ "." + switch (person) { + | Teacher => "Hey Professor!" + | Director => "Hello Director." + | Student("Richard") => "Still here Ricky?" + | Student(anyOtherName) => "Hey, " ++ anyOtherName ++ "." }; diff --git a/reorder-python-imports-test-0.py b/reorder-python-imports-test-0.py index 48bfd1c5..de286926 100644 --- a/reorder-python-imports-test-0.py +++ b/reorder-python-imports-test-0.py @@ -1,7 +1,7 @@ -import os, sys +import os +import sys from argparse import ArgumentParser -from foo import bar from baz import womp - from crazy import example1 +from foo import bar diff --git a/rubocop-test-0.rb b/rubocop-test-0.rb index 071838b6..b039e73b 100644 --- a/rubocop-test-0.rb +++ b/rubocop-test-0.rb @@ -1,3 +1,3 @@ def some_method - do_something + do_something end diff --git a/rubocop-test-1.rb b/rubocop-test-1.rb index cbef262c..11c11f79 100644 --- a/rubocop-test-1.rb +++ b/rubocop-test-1.rb @@ -1,5 +1,5 @@ case foo -when *[1, 2, 3, 4] +when 1, 2, 3, 4 bar when 5 baz diff --git a/rubocop-test-2.rb b/rubocop-test-2.rb index ba94afed..45b45f62 100644 --- a/rubocop-test-2.rb +++ b/rubocop-test-2.rb @@ -7,8 +7,8 @@ class User < ApplicationRecord # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable - has_many :radars, foreign_key: "owner_id", dependent: :destroy - has_many :created_topics, foreign_key: "creator_id", class_name: "Topic", dependent: :nullify + has_many :radars, foreign_key: 'owner_id', dependent: :destroy + has_many :created_topics, foreign_key: 'creator_id', class_name: 'Topic', dependent: :nullify has_many :blips, through: :radars attr_accessor :login @@ -24,7 +24,7 @@ class User < ApplicationRecord def self.find_for_database_authentication(warden_conditions) conditions = warden_conditions.dup if (login = conditions.delete(:login)) - where(conditions).find_by(["lower(username) = :value OR lower(email) = :value", { value: login.downcase }]) + where(conditions).find_by(['lower(username) = :value OR lower(email) = :value', { value: login.downcase }]) else # :nocov: find_by(conditions) diff --git a/rustfmt-test-0.rs b/rustfmt-test-0.rs index 639567b3..a5d4acc7 100644 --- a/rustfmt-test-0.rs +++ b/rustfmt-test-0.rs @@ -1,4 +1,5 @@ // Attributes should be on their own lines struct CRepr { - x: f32,y: f32, + x: f32, + y: f32, } diff --git a/scalafmt-test-0.scala b/scalafmt-test-0.scala index 81e71dee..d5a9ddcd 100644 --- a/scalafmt-test-0.scala +++ b/scalafmt-test-0.scala @@ -2,6 +2,6 @@ object a { def c(b: List[Int]): List[Int] = for { a <- b - if ((a)) + if a } yield a } diff --git a/shellcheck-test-0.sh b/shellcheck-test-0.sh index fb1db925..dcfbb309 100644 --- a/shellcheck-test-0.sh +++ b/shellcheck-test-0.sh @@ -1 +1 @@ -echo $foo +echo "$foo" diff --git a/shellcheck-test-1.sh b/shellcheck-test-1.sh index 4bc43aa0..5b2d5585 100644 --- a/shellcheck-test-1.sh +++ b/shellcheck-test-1.sh @@ -1,6 +1,6 @@ ## Example of a broken script. for f in $(ls *.m3u) do - grep -qi hq.*mp3 $f \ + grep -qi hq.*mp3 "$f" \ && echo -e 'Playlist $f contains a HQ file in mp3 format' done diff --git a/shellharden-test-0.sh b/shellharden-test-0.sh index 9a1858fd..c187da0f 100644 --- a/shellharden-test-0.sh +++ b/shellharden-test-0.sh @@ -1,3 +1,3 @@ #!/bin/sh x=x -var=`echo $x` +var=`echo "$x"` diff --git a/shfmt-test-0.sh b/shfmt-test-0.sh index bcbb8743..195edb6a 100644 --- a/shfmt-test-0.sh +++ b/shfmt-test-0.sh @@ -1,5 +1,4 @@ #!/bin/sh -if [ 2 -eq 2 ] - then - echo "yup" - fi +if [ 2 -eq 2 ]; then + echo "yup" +fi diff --git a/sqlformat-test-0.sql b/sqlformat-test-0.sql index 784b5f9b..a520a40e 100644 --- a/sqlformat-test-0.sql +++ b/sqlformat-test-0.sql @@ -1,2 +1,5 @@ -- hi there -select * from students WHERE students.age > 10; + +SELECT * +FROM students +WHERE students.age > 10; diff --git a/sqlformat-test-1.sql b/sqlformat-test-1.sql index 238eab01..ee2cac0c 100644 --- a/sqlformat-test-1.sql +++ b/sqlformat-test-1.sql @@ -1,2 +1,2 @@ -INSERT - INTO x VALUES () +INSERT INTO x +VALUES () diff --git a/standardrb-test-0.rb b/standardrb-test-0.rb index 071838b6..b039e73b 100644 --- a/standardrb-test-0.rb +++ b/standardrb-test-0.rb @@ -1,3 +1,3 @@ def some_method - do_something + do_something end diff --git a/stylish-haskell-test-0.hs b/stylish-haskell-test-0.hs index fd4c8c8a..a07dc589 100644 --- a/stylish-haskell-test-0.hs +++ b/stylish-haskell-test-0.hs @@ -1,2 +1,2 @@ {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE RecordWildCards #-} diff --git a/stylish-haskell-test-1.hs b/stylish-haskell-test-1.hs index 125bd495..2814620c 100644 --- a/stylish-haskell-test-1.hs +++ b/stylish-haskell-test-1.hs @@ -1,9 +1,9 @@ -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE GADTs #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} module Restyler.App ( @@ -18,37 +18,37 @@ module Restyler.App ) where -import Restyler.Prelude - -import Conduit (runResourceT, sinkFile) -import qualified Data.Text as T -import qualified Data.Text.IO as T -import qualified Data.Vector as V -import GitHub.Endpoints.Issues.Comments -import GitHub.Endpoints.PullRequests -import GitHub.Endpoints.Repos.Statuses -import GitHub.Request -import Network.HTTP.Client.TLS -import Network.HTTP.Simple hiding (Request) -import Restyler.Capabilities.Docker -import Restyler.Capabilities.Git -import Restyler.Capabilities.GitHub -import Restyler.Capabilities.RemoteFile -import Restyler.Capabilities.System -import Restyler.Model.Config -import Restyler.Model.RemoteFile -import qualified System.Directory as Directory -import qualified System.Exit as Exit -import System.Process +import Restyler.Prelude + +import Conduit (runResourceT, sinkFile) +import qualified Data.Text as T +import qualified Data.Text.IO as T +import qualified Data.Vector as V +import GitHub.Endpoints.Issues.Comments +import GitHub.Endpoints.PullRequests +import GitHub.Endpoints.Repos.Statuses +import GitHub.Request +import Network.HTTP.Client.TLS +import Network.HTTP.Simple hiding (Request) +import Restyler.Capabilities.Docker +import Restyler.Capabilities.Git +import Restyler.Capabilities.GitHub +import Restyler.Capabilities.RemoteFile +import Restyler.Capabilities.System +import Restyler.Model.Config +import Restyler.Model.RemoteFile +import qualified System.Directory as Directory +import qualified System.Exit as Exit +import System.Process -- | Application environment data App = App - { appLogLevel :: LogLevel - , appLogColor :: Bool - , appAccessToken :: Text - , appPullRequest :: PullRequest + { appLogLevel :: LogLevel + , appLogColor :: Bool + , appAccessToken :: Text + , appPullRequest :: PullRequest -- ^ The @'PullRequest'@ we are restyling - , appConfig :: Config + , appConfig :: Config -- ^ Configuration loaded from @.restyled.yaml@ , appRestyledPullRequest :: Maybe SimplePullRequest -- ^ Existing restyled @'PullRequest'@ if it exists diff --git a/stylish-haskell-test-2.hs b/stylish-haskell-test-2.hs index 80120d97..34b69ddf 100644 --- a/stylish-haskell-test-2.hs +++ b/stylish-haskell-test-2.hs @@ -1,4 +1,4 @@ module Foo where -import FrontRow.Renaissance.RenaissancePlatform -import FrontRow.Renaissance.RPID -import FrontRow.Renaissance.RPIdentifier +import FrontRow.Renaissance.RenaissancePlatform +import FrontRow.Renaissance.RPID +import FrontRow.Renaissance.RPIdentifier diff --git a/taplo-test-0.toml b/taplo-test-0.toml index 12d39a03..a96a3dab 100644 --- a/taplo-test-0.toml +++ b/taplo-test-0.toml @@ -1,6 +1,2 @@ -var = true -list = [ - 'hi', - 'there' - , 'now' - ] +var = true +list = ['hi', 'there', 'now'] diff --git a/taplo-test-1.toml b/taplo-test-1.toml index 5ffce3b4..7b686049 100644 --- a/taplo-test-1.toml +++ b/taplo-test-1.toml @@ -1,9 +1,16 @@ -long_list = [ 'hi', 'there' , 'now' , 'now' , 'now' , 'now' , 'now' - , 'now' - , 'now' - , 'now' - , 'now' - , 'now' - , 'now' - , 'now' - ] +long_list = [ + 'hi', + 'there', + 'now', + 'now', + 'now', + 'now', + 'now', + 'now', + 'now', + 'now', + 'now', + 'now', + 'now', + 'now', +] diff --git a/terraform-test-0.tf b/terraform-test-0.tf index eec6aa0e..0a5a0a67 100644 --- a/terraform-test-0.tf +++ b/terraform-test-0.tf @@ -1,5 +1,5 @@ locals = { - short = 1 - this_is_longer = true + short = 1 + this_is_longer = true this_is_really_longer_than_it_needs_to_be = "bazzle" } diff --git a/terraform-test-1.tf b/terraform-test-1.tf index aa673fc4..b5ef3817 100644 --- a/terraform-test-1.tf +++ b/terraform-test-1.tf @@ -1,4 +1,4 @@ variable "policy_definition_name" { - description = "Policy definition name must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and is limited between 2 and 60 characters in length." - default = "demoPolicy" + description = "Policy definition name must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and is limited between 2 and 60 characters in length." + default = "demoPolicy" } diff --git a/verible-test-0.sv b/verible-test-0.sv index 152347f9..d2502340 100644 --- a/verible-test-0.sv +++ b/verible-test-0.sv @@ -1,13 +1,13 @@ -module debounce( - input wire logic clk, output logic debounced - ); -stateType ns; +module debounce ( + input wire logic clk, + output logic debounced +); + stateType ns; - always_comb - begin - ns = ERR; - end + always_comb begin + ns = ERR; + end logic timerDone; - logic clrTimer; - endmodule + logic clrTimer; +endmodule diff --git a/whitespace-test-0.tmp b/whitespace-test-0.tmp index 6c8eb9c5..574de7aa 100644 --- a/whitespace-test-0.tmp +++ b/whitespace-test-0.tmp @@ -1,5 +1,5 @@ -line one -line two - +line one +line two + line three \ line four diff --git a/whitespace-test-1.tmp b/whitespace-test-1.tmp index 9aae351e..e779ca50 100644 --- a/whitespace-test-1.tmp +++ b/whitespace-test-1.tmp @@ -2,5 +2,3 @@ line one line two line three - - diff --git a/whitespace-test-2.tmp b/whitespace-test-2.tmp index 6066225e..e779ca50 100644 --- a/whitespace-test-2.tmp +++ b/whitespace-test-2.tmp @@ -1,4 +1,4 @@ line one line two -line three \ No newline at end of file +line three diff --git a/yapf-test-0.py b/yapf-test-0.py index 9941de74..4ce75ab8 100644 --- a/yapf-test-0.py +++ b/yapf-test-0.py @@ -1,9 +1,19 @@ -import math, sys; +import math, sys + + def example1(): ####This is a long comment. This should be wrapped to fit within 72 characters. - some_tuple=( 1,2, 3,'a' ); - some_variable={'long':'Long code lines should be wrapped within 79 characters.', - 'other':[math.pi, 100,200,300,9876543210,'This is a long string that goes on'], - 'more':{'inner':'This whole logical line should be wrapped.',some_tuple:[1, - 20,300,40000,500000000,60000000000000000]}} + some_tuple = (1, 2, 3, 'a') + some_variable = { + 'long': + 'Long code lines should be wrapped within 79 characters.', + 'other': [ + math.pi, 100, 200, 300, 9876543210, + 'This is a long string that goes on' + ], + 'more': { + 'inner': 'This whole logical line should be wrapped.', + some_tuple: [1, 20, 300, 40000, 500000000, 60000000000000000] + } + } return (some_tuple, some_variable)