Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated testing #36

Open
jayvdb opened this issue Apr 30, 2016 · 7 comments
Open

Automated testing #36

jayvdb opened this issue Apr 30, 2016 · 7 comments

Comments

@jayvdb
Copy link
Collaborator

jayvdb commented Apr 30, 2016

It would be useful to have some form of automated testing to

  1. verify the .md is correct syntax
  2. the structure of the .md is consistent, e.g. wrt whitespace between problems
@jayvdb
Copy link
Collaborator Author

jayvdb commented Apr 30, 2016

The obvious choice is to use Travis CI. What language should the tools be?

@imsky
Copy link
Owner

imsky commented Apr 30, 2016

how would either 1 or 2 be done? for languages, i think python or javascript should work

@jayvdb
Copy link
Collaborator Author

jayvdb commented May 1, 2016

For 1, run a very strict md parser on the file.

For 2, we look for any structural aspects which are not covered by the strict md parser.

Python would be my preference, for language, but would be happy with other languages if it has a better linter.

Two Python options found rather quickly

  1. https://pypi.python.org/pypi/pymarkdownlint / https://github.com/jorisroovers/pymarkdownlint
  2. https://pypi.python.org/pypi/mdlint / https://github.com/avoceteditors/mdlint

Others that probably have linting features

  1. https://pypi.python.org/pypi/Markdown
  2. https://pypi.python.org/pypi/ghmarkdown

From other languages:

  1. Ruby: https://github.com/mivok/markdownlint
  2. JS: https://github.com/DavidAnson/markdownlint
  3. JS: https://github.com/wooorm/remark-lint

@imsky
Copy link
Owner

imsky commented May 3, 2016

i think just doing 1 is going to work for now. python seems fine

@jayvdb jayvdb mentioned this issue Jun 12, 2016
@jayvdb
Copy link
Collaborator Author

jayvdb commented Jun 12, 2016

Note that https://github.com/wooorm/remark-lint (JS) finds more problems than the others, which I havent had time to look though closely.

@imsky
Copy link
Owner

imsky commented Jun 12, 2016

interesting, feel free to integrate. i can take a look later also

@jayvdb
Copy link
Collaborator Author

jayvdb commented Jun 14, 2016

I've got remark lint working, with it picking up some very good problems missed by the other two.
I also tried using it to auto-format the .md, but it has too many undesirable unnecessary changes to be worth using at this stage (but waiting on remarkjs/remark#187 as it may be there is a config flag I have missed ), and it also breaks the syntax in a few places. It also doesnt fix the syntax for the cases where the rendering is currently wrong, so most of the current patches are still needed as-is even if we used remark to automatically neaten the .md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants