CONTRIBUTING.md (pandoc-2.11.1.1) | : | CONTRIBUTING.md (pandoc-2.11.2) | ||
---|---|---|---|---|
skipping to change at line 208 | skipping to change at line 208 | |||
You can rebuild the golden tests in `tests/` by passing | You can rebuild the golden tests in `tests/` by passing | |||
`--accept` to the test script. (If you're using stack, `stack | `--accept` to the test script. (If you're using stack, `stack | |||
test --test-arguments "--accept"`; or `make TESTARGS=--accept`). | test --test-arguments "--accept"`; or `make TESTARGS=--accept`). | |||
Then check the changed golden files for accuracy, and | Then check the changed golden files for accuracy, and | |||
commit the changes. For docx or pptx tests, open the files in Word | commit the changes. For docx or pptx tests, open the files in Word | |||
or Powerpoint to ensure that they weren't corrupted and that | or Powerpoint to ensure that they weren't corrupted and that | |||
they had the expected result, and mention the Word/Powerpoint | they had the expected result, and mention the Word/Powerpoint | |||
version and OS in your commit comment. | version and OS in your commit comment. | |||
Code style | ||||
---------- | ||||
Pandoc uses [hlint] to identify opportunities for code improvements | ||||
like redundant brackets or unnecessary `Language` extensions. | ||||
However, sometimes there are cases where there are good reasons to | ||||
use code different from what hlint proposes. In these cases, the | ||||
respective warning should be disabled in the file `.hlint.yaml`. | ||||
There should be no errors when running `hlint .`; this is checked by | ||||
the continuous integration (CI) setup. It is recommended that | ||||
contributors check their code with a local hlint installation, but | ||||
relying on the CI is fine, too. | ||||
A good way to ensure no new warnings are introduced is to use a Git | ||||
[pre-commit hook] which runs hlint on all updated Haskell files | ||||
before creating a commit: | ||||
#!/bin/sh | ||||
git diff --cached --name-only | grep '.hs$' | xargs hlint | ||||
Saving this to `.git/hooks/pre-commit`, and making the script | ||||
executable, will prevent accidental introduction of potentially | ||||
problematic code. | ||||
Benchmarks | Benchmarks | |||
---------- | ---------- | |||
To run benchmarks with cabal: | To run benchmarks with cabal: | |||
cabal configure --enable-benchmarks | cabal configure --enable-benchmarks | |||
cabal build | cabal build | |||
cabal bench | cabal bench | |||
With stack: | With stack: | |||
skipping to change at line 361 | skipping to change at line 386 | |||
[open issues]: https://github.com/jgm/pandoc/issues | [open issues]: https://github.com/jgm/pandoc/issues | |||
[closed issues]: https://github.com/jgm/pandoc/issues?q=is%3Aissue+is%3Aclosed | [closed issues]: https://github.com/jgm/pandoc/issues?q=is%3Aissue+is%3Aclosed | |||
[latest released version]: https://github.com/jgm/pandoc/releases/latest | [latest released version]: https://github.com/jgm/pandoc/releases/latest | |||
[Nightly builds]: https://github.com/jgm/pandoc/actions?query=workflow%3ANightly | [Nightly builds]: https://github.com/jgm/pandoc/actions?query=workflow%3ANightly | |||
[pandoc-discuss]: http://groups.google.com/group/pandoc-discuss | [pandoc-discuss]: http://groups.google.com/group/pandoc-discuss | |||
[issue tracker]: https://github.com/jgm/pandoc/issues | [issue tracker]: https://github.com/jgm/pandoc/issues | |||
[User's Guide]: http://pandoc.org/MANUAL.html | [User's Guide]: http://pandoc.org/MANUAL.html | |||
[FAQs]: http://pandoc.org/faqs.html | [FAQs]: http://pandoc.org/faqs.html | |||
[EditorConfig]: http://editorconfig.org/ | [EditorConfig]: http://editorconfig.org/ | |||
[Haskell platform]: http://www.haskell.org/platform/ | [Haskell platform]: http://www.haskell.org/platform/ | |||
[hlint]: https://hackage.haskell.org/package/hlint | ||||
[hsb2hs]: http://hackage.haskell.org/package/hsb2hs | [hsb2hs]: http://hackage.haskell.org/package/hsb2hs | |||
[pre-commit hook]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks | ||||
[GitHub labels]: https://github.com/jgm/pandoc/labels | [GitHub labels]: https://github.com/jgm/pandoc/labels | |||
[good first issue]:https://github.com/jgm/pandoc/labels/good%20first%20issue | [good first issue]:https://github.com/jgm/pandoc/labels/good%20first%20issue | |||
[enhancement]: https://github.com/jgm/pandoc/labels/enhancement | [enhancement]: https://github.com/jgm/pandoc/labels/enhancement | |||
[bug]: https://github.com/jgm/pandoc/labels/bug | [bug]: https://github.com/jgm/pandoc/labels/bug | |||
[complexity:low]: https://github.com/jgm/pandoc/labels/complexity:low | [complexity:low]: https://github.com/jgm/pandoc/labels/complexity:low | |||
[complexity:high]: https://github.com/jgm/pandoc/labels/complexity:high | [complexity:high]: https://github.com/jgm/pandoc/labels/complexity:high | |||
[docs]: https://github.com/jgm/pandoc/labels/docs | [docs]: https://github.com/jgm/pandoc/labels/docs | |||
[format:markdown]: https://github.com/jgm/pandoc/labels/format:markdown | [format:markdown]: https://github.com/jgm/pandoc/labels/format:markdown | |||
[new:reader]: https://github.com/jgm/pandoc/labels/new:reader | [new:reader]: https://github.com/jgm/pandoc/labels/new:reader | |||
[new:writer]: https://github.com/jgm/pandoc/labels/new:writer | [new:writer]: https://github.com/jgm/pandoc/labels/new:writer | |||
End of changes. 3 change blocks. | ||||
0 lines changed or deleted | 27 lines changed or added |