From 387d158bd1192e459d06c29e2ae923b7b30ffa4a Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 12 Apr 2020 08:32:39 +0200 Subject: [PATCH] Write contrinbuting guidelines --- .gitignore | 3 +++ CHANGELOG.md | 1 + CONTRIBUTING.md | 31 +++++++++++++++++++++++++++++++ README.md | 9 ++++++++- stack.yaml | 2 +- 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/.gitignore b/.gitignore index 3594704..a074daa 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ cabal.sandbox.config cabal.project.local /graphql.cabal + +# GHC +*.hi diff --git a/CHANGELOG.md b/CHANGELOG.md index 48cbd3c..80c39bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to - Type system definition parser. - `Trans.argument`. - Schema extension parser. +- Contributing guidelines ### Changed - Rename `AST.Definition` into `AST.Document.ExecutableDefinition`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a1441f5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing guidelines + +## Testing + +To ensure all code changes adhere to existing code quality standards, some +automatic checks can be run locally. + +Ensure that the code builds without warnings and passes the tests: + +```sh +stack test --pedantic +``` + +And also run the linter on your code: + +```sh +stack build hlint +stack exec hlint -- src tests +``` + +Build the documentation and check if you get any warnings: + +```sh +stack haddock +``` + +Validate that literate Haskell (tutorials) files compile without any warnings: + +```sh +stack ghc -- -Wall -fno-code docs/tutorial/*.lhs +``` diff --git a/README.md b/README.md index 136b9dd..f44e429 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,18 @@ For the list of currently missing features see issues marked as ## Documentation API documentation is available through -[hackage](https://hackage.haskell.org/package/graphql). +[Hackage](https://hackage.haskell.org/package/graphql). You'll also find a small tutorial with some examples under [docs/tutorial](https://github.com/caraus-ecms/graphql/tree/master/docs/tutorial). +## Further information + +- [Contributing guidelines](CONTRIBUTING.md). +- [Changelog](CHANGELOG.md) – this one contains the most recent changes; + individual changelogs for specific versions can be found on + [Hackage](https://hackage.haskell.org/package/graphql). + ## Contact Suggestions, contributions and bug reports are welcome. diff --git a/stack.yaml b/stack.yaml index b9bd0ab..6fa5d59 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-15.0 +resolver: lts-15.7 packages: - .