967e7f5fb9
..and add new definitions isomorphic to xml-light's, but with Text instead of String. This allows us to keep most of the code in existing readers that use xml-light, but avoid lots of unnecessary allocation. We also add versions of the functions from xml-light's Text.XML.Light.Output and Text.XML.Light.Proc that operate on our modified XML types, and functions that convert xml-light types to our types (since some of our dependencies, like texmath, use xml-light). Update golden tests for docx and pptx. OOXML test: Use `showContent` instead of `ppContent` in `displayDiff`. Docx: Do a manual traversal to unwrap sdt and smartTag. This is faster, and needed to pass the tests. Benchmarks: A = prior to8ca191604d
(Feb 8) B = as of8ca191604d
(Feb 8) C = this commit | Reader | A | B | C | | ------- | ----- | ------ | ----- | | docbook | 18 ms | 12 ms | 10 ms | | opml | 65 ms | 62 ms | 35 ms | | jats | 15 ms | 11 ms | 9 ms | | docx | 72 ms | 69 ms | 44 ms | | odt | 78 ms | 41 ms | 28 ms | | epub | 64 ms | 61 ms | 56 ms | | fb2 | 14 ms | 5 ms | 4 ms |
114 lines
2.7 KiB
YAML
114 lines
2.7 KiB
YAML
# HLint configuration file
|
|
# https://github.com/ndmitchell/hlint
|
|
##########################
|
|
|
|
# Specify additional command line arguments
|
|
#
|
|
- arguments: [--color=auto, --cpp-ansi]
|
|
|
|
# Ignore some builtin hints
|
|
#
|
|
- ignore: {name: "Avoid lambda"}
|
|
- ignore: {name: "Eta reduce"}
|
|
- ignore: {name: "Evaluate"}
|
|
- ignore: {name: "Reduce duplication"} # TODO: could be more fine-grained
|
|
- ignore: {name: "Use &&&"}
|
|
- ignore: {name: "Use String"}
|
|
- ignore: {name: "Use camelCase"}
|
|
- ignore: {name: "Use fmap"} # specific for GHC 7.8 compat
|
|
- ignore: {name: "Use isDigit"}
|
|
|
|
- ignore:
|
|
name: "Monad law, left identity"
|
|
within: Text.Pandoc.App.OutputSettings
|
|
|
|
- ignore:
|
|
name: "Move brackets to avoid $"
|
|
within: Text.Pandoc.Writers.CslJson
|
|
|
|
- ignore:
|
|
name: "Redundant <$>"
|
|
within:
|
|
- Text.Pandoc.Readers.Docx.Parse
|
|
- Text.Pandoc.Writers.MediaWiki
|
|
- Text.Pandoc.Writers.OpenDocument
|
|
- Text.Pandoc.Writers.Powerpoint.Output
|
|
- Text.Pandoc.Writers.Powerpoint.Presentation
|
|
|
|
- ignore:
|
|
name: "Redundant return"
|
|
within: Text.Pandoc.Citeproc.BibTeX
|
|
|
|
# TODO: check
|
|
- ignore:
|
|
name: "Redundant bracket"
|
|
within:
|
|
- Text.Pandoc.Citeproc
|
|
- Text.Pandoc.Citeproc.BibTeX
|
|
- Text.Pandoc.Citeproc.MetaValue
|
|
|
|
- ignore:
|
|
name: "Use <$>"
|
|
within:
|
|
- Text.Pandoc.Readers.LaTeX
|
|
- Text.Pandoc.Readers.Markdown
|
|
|
|
- ignore:
|
|
name: "Use camelCase"
|
|
within:
|
|
- Tests.Writers.Docbook
|
|
- Tests.Writers.Native
|
|
- Text.Pandoc.Citeproc
|
|
- Text.Pandoc.Extensions
|
|
- Text.Pandoc.Lua.Marshaling.Version
|
|
- Text.Pandoc.Lua.Module.Pandoc
|
|
- Text.Pandoc.Lua.Module.Utils
|
|
- Text.Pandoc.Readers.Odt.ContentReader
|
|
- Text.Pandoc.Readers.Odt.Namespaces
|
|
|
|
- ignore:
|
|
name: "Use forM_"
|
|
within:
|
|
- Text.Pandoc.Readers.DocBook
|
|
|
|
- ignore:
|
|
name: "Use Just"
|
|
within:
|
|
- Text.Pandoc.Citeproc.MetaValue
|
|
- Text.Pandoc.Readers.Odt.ContentReader
|
|
- Text.Pandoc.Writers.Roff
|
|
|
|
- ignore:
|
|
name: "Use list comprehension"
|
|
within: Text.Pandoc.Citeproc.BibTeX
|
|
|
|
- ignore:
|
|
name: "Use list literal pattern"
|
|
within: Text.Pandoc.Citeproc.MetaValue
|
|
|
|
# TODO: check
|
|
- ignore:
|
|
name: "Use second"
|
|
within:
|
|
- Text.Pandoc.Citeproc.BibTeX
|
|
- Text.Pandoc.Citeproc.Locator
|
|
|
|
# TODO: check
|
|
- ignore:
|
|
name: "Use sortOn"
|
|
within: Text.Pandoc.Writers.OpenDocument
|
|
|
|
- ignore:
|
|
name: "Use tuple-section"
|
|
within:
|
|
- Text.Pandoc.Readers.EPUB
|
|
- Text.Pandoc.ImageSize
|
|
- Text.Pandoc.Readers.Markdown
|
|
- Text.Pandoc.Readers.RST
|
|
|
|
# fromRight is only in base >= 4.10
|
|
- ignore:
|
|
name: "Use fromRight"
|
|
|
|
# Define some custom infix operators
|
|
# - fixity: infixr 3 ~^#^~
|