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

Add schema for and validate recog content; fix content #84

Merged
merged 14 commits into from
Sep 23, 2015

Conversation

jhart-r7
Copy link
Contributor

Fixes #81. There are three main things happening here:

  • A new schema was added that I believe enforces correctly formatted recog content
  • This schema is used to test all content shipped with recog or tested with recog_verify and recog_match
  • All existing content was updated to conform to the schema. Most changes were just ordering, but there were some legitimate problems lurking too. See https://github.com/rapid7/recog/pull/84/files?w=1 for an easier view, since there was a ton of whitespace changes.

There is still a bit of a disconnect between what is tested in the unit tests and what is tested by recog_verify, but I'm not going to solve that now. This just ensures that the content adheres to our standard.

Validation

  • Unit tests pass
  • Recog content and supporting ruby code tested out in some dependent projects (metasploit-framework and nexpose)

Order of some elements is now enforced with this so I'll need to try and
find a way to reorder the files beforehand
These should all be 100% functionally identical, the biggest difference
being that the description elements are now before example.  The rest is
just whitespace change.
was actually a botched comment
The primary thing this does is fix the ordering.  To use it, roughly:

for f in `ls xml/*.xml`; do
  xsltproc misc/order.xsl $f > /tmp/f && xmllint --format /tmp/f
  > /tmp/f2 && mv /tmp/f2 $f
done
@jhart-r7 jhart-r7 changed the title Add schema for recog content; fix content Add schema for and validate recog content; fix content Sep 23, 2015
@pmiseiko-r7
Copy link

🚢 it. This looks good.

@jhart-r7 jhart-r7 merged commit 5e5c6cb into rapid7:master Sep 23, 2015
@jhart-r7 jhart-r7 deleted the bug/81-add-xsd branch October 10, 2018 20:08
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

Successfully merging this pull request may close these issues.

2 participants