Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Pretty and sanitizier xml #32

Closed
wants to merge 2 commits into from
Closed

Conversation

agustinhenze
Copy link
Contributor

Add pretty_xml for check, reformat and re-indent. It uses xmllint if it's available, otherwise the content is not modified. It closes #19

Agustin Henze added 2 commits January 23, 2019 18:52
It uses xmllint if it's available, otherwise the content is not modified.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 120

  • 14 of 14 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 97.231%

Totals Coverage Status
Change from base Build 114: 0.2%
Covered Lines: 250
Relevant Lines: 257

💛 - Coveralls

@@ -50,6 +52,28 @@ def print_test_cases(patches, dbdir, pw_cookie=None):
print(test_case)


def pretty_xml(xml_content):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer this was at least named maybe_pretty_xml(), try_prettify_xml(), or something like that, or, better, that kpet would have an option to turn this off (or on), and the function doing it unconditionally. Otherwise kpet users as well as developers would find it confusing that this sometimes works and sometimes doesn't without apparent reason.

Another way could be requiring xmllint, but we can't do that with just Python packaging, as you know.

@spbnick spbnick self-assigned this Feb 6, 2019
@cki-bot
Copy link

cki-bot commented Feb 19, 2019

Hi! This is the friendly CKI test bot. Whenever you mention me in a comment together with the word "test", I will test this PR and post the results!

@agustinhenze
Copy link
Contributor Author

Superseded by #49

@agustinhenze agustinhenze deleted the pretty-and-sanitizier-xml branch February 22, 2019 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render a prettified xml
4 participants