fix: replace yamllint library install with exec call#876
fix: replace yamllint library install with exec call#876anik120 merged 5 commits intoinstructlab:mainfrom nathan-weinberg:fix-lint
Conversation
importing yamllint directly into the cli is not an option due to license issues this maintains functionality while bringing us into compliance Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
|
Would it be okay to install yamllint but not import it? If you keep |
@mrutkows would you know the answer to this? |
|
I think the unit tests are failing as when We can't do the former method of inline YAML rules in the code due to the execing out - I'd like to have an explicit path to that file but not sure how to get an absolute path to the CLI root dir, would anyone know a way to do so or have an idea for another solution? |
There was a problem hiding this comment.
LGTM from a revert PoV. Unit tests need to pass of course... Thanks @nathan-weinberg for such a quick response!
|
Resolves #870 once merged. |
russellb
left a comment
There was a problem hiding this comment.
I'm happy with it from a licensing PoV.
I have one implementation suggestion, though.
So can supply the inline string of the default config as a string on the command line. usage: yamllint [-h] [-] [-c CONFIG_FILE | -d CONFIG_DATA] [--list-files] [-f {parsable,standard,colored,github,auto}] [-s] [--no-warnings] [-v]
[FILE_OR_DIR ...] |
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Previously was vice versa Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
revert related changes to README.md Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
mrutkows
left a comment
There was a problem hiding this comment.
Approving this necessary reversion.
anik120
left a comment
There was a problem hiding this comment.
Existing test cases are passing, and it's taking care of the licensing consideration. Should be good for now, I'm guessing we'll have follow ups for this later on.
Changes
Which issue is resolved by this Pull Request:
Resolves #870
Description of your changes:
yamllintfromrequirements.txtyamllintto required binaries list inREADME.md.yamllintfile with default rules to replace in-line code, changed CLI default fromyaml_rules.yamlto.yamllintto match (see https://yamllint.readthedocs.io/en/stable/configuration.html)ilab diffclick arg to align withilab generateread_taxonomy_fileto exec out toyamllintinstead of doing the non-compliant library import methodSome test output (note I have
DEBUGlog level here):