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

Support --format with xmllint #2240

Closed
bdovaz opened this issue Jan 9, 2023 · 3 comments
Closed

Support --format with xmllint #2240

bdovaz opened this issue Jan 9, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@bdovaz
Copy link
Collaborator

bdovaz commented Jan 9, 2023

@nvuillam has not raised this issue so far?

It looks like you can at least configure the indent with the XMLLINT_INDENT environment variable:

https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html

@bdovaz bdovaz added the enhancement New feature or request label Jan 9, 2023
@nvuillam
Copy link
Member

nvuillam commented Jan 9, 2023

  • I didn't know it was possible ... but i didn't check, xmllint is inherited from super-linter who can not apply updates

Maybe we should allow it but disable it by default?

@bdovaz
Copy link
Collaborator Author

bdovaz commented Jan 9, 2023

@nvuillam Questions:

  1. How do I disable it by default? In the descriptor I have added cli_lint_fix_arg_name: "--format".
  2. The environment variable XMLLINT_INDENT (string) is the one that controls the number of spaces:
    • How can I configure the linter so that this setting can be passed to it like any other linter configuration?
    • A class is needed for this, isn't it? Like a XmlLintLinter.py in order to redirect this configuration to this process

@nvuillam
Copy link
Member

nvuillam commented Jan 9, 2023

  1. The current architecture does not allow to do that :D We have to think about it... maybe an additional variable XML_XMLLINT_AUTOFORMAT , that could be used in XmlLintLinter.py

2 descriptors allow to define custom variables :)
They will appear in the doc after build.sh --doc, but I'm not sure if it also updates JSON schema (in that case it must be done manually)

Example:

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

No branches or pull requests

2 participants