From b35713c09f862ab2a225feb791b64467020459d7 Mon Sep 17 00:00:00 2001 From: Matt Parsons Date: Thu, 29 Oct 2020 16:20:52 -0600 Subject: [PATCH] Autoformatting + Stylish Haskell Config (#218) * Add stylish-haskell.yaml, update spacing to 4 in configs * update travis * lol * major formatting stuff * fix parse error * fix * warnings, more tidying up * Add style guide [ci skip] * faster build perhaps * cabbal * sigh --- .editorconfig | 4 +- .github/PULL_REQUEST_TEMPLATE.md | 11 +- .github/workflows/haskell.yml | 8 +- .stylish-haskell.yaml | 39 + .travis.yml | 5 +- esqueleto.cabal | 290 +- src/Database/Esqueleto/Experimental.hs | 844 +++--- src/Database/Esqueleto/Internal/ExprParser.hs | 64 +- src/Database/Esqueleto/Internal/Internal.hs | 2344 +++++++++-------- src/Database/Esqueleto/Internal/Language.hs | 197 +- .../Esqueleto/Internal/PersistentImport.hs | 313 ++- src/Database/Esqueleto/Internal/Sql.hs | 148 +- src/Database/Esqueleto/MySQL.hs | 10 +- src/Database/Esqueleto/PostgreSQL.hs | 292 +- src/Database/Esqueleto/PostgreSQL/JSON.hs | 215 +- .../Esqueleto/PostgreSQL/JSON/Instances.hs | 78 +- src/Database/Esqueleto/SQLite.hs | 6 +- style-guide.md | 9 + test/Common/Test.hs | 992 ++++--- 19 files changed, 3060 insertions(+), 2809 deletions(-) create mode 100644 .stylish-haskell.yaml create mode 100644 style-guide.md diff --git a/.editorconfig b/.editorconfig index 9f49510..c7736d5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,8 +11,8 @@ insert_final_newline = true [*.{hs,md,php}] indent_style = space -indent_size = 2 -tab_width = 2 +indent_size = 4 +tab_width = 4 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d349382..3bb09c5 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,14 @@ Before submitting your PR, check that you've: -- [ ] Bumped the version number -- [ ] Documented new APIs with [Haddock markup](https://www.haskell.org/haddock/doc/html/index.html) -- [ ] Added [`@since` declarations](http://haskell-haddock.readthedocs.io/en/latest/markup.html#since) to the Haddock +- [ ] Bumped the version number. +- [ ] Documented new APIs with [Haddock markup](https://www.haskell.org/haddock/doc/html/index.html). +- [ ] Added [`@since` declarations](http://haskell-haddock.readthedocs.io/en/latest/markup.html#since) to the Haddock. +- [ ] Ran `stylish-haskell` and otherwise adhered to the [style guide](https://github.com/bitemyapp/esqueleto/blob/master/style-guide.yaml). After submitting your PR: -- [ ] Update the Changelog.md file with a link to your PR -- [ ] Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts) +- [ ] Update the Changelog.md file with a link to your PR. +- [ ] Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts).