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

Missing "kind" in message for several files/ #3245

Closed
bluikko opened this issue Apr 6, 2023 · 0 comments · Fixed by #3247
Closed

Missing "kind" in message for several files/ #3245

bluikko opened this issue Apr 6, 2023 · 0 comments · Fixed by #3247
Assignees
Labels

Comments

@bluikko
Copy link
Contributor

bluikko commented Apr 6, 2023

Summary

Running at verbosity 10 reveals that several files stored in rolename/files/ are missing "kind", which is probably fine internally but the output could be improved. They are actually printed with the field that usually lists the "kind" missing in the output which produces a strange looking message where there are 2 spaces where the missing "kind" should be:

data set to None for roles/rolename/files/php.conf due to being of  kind.
                                                                   ^ here

Example of file where "kind" is detected:

data set to None for roles/rolename/files/php.ini due to being of text/ini kind.

If this "empty kind" is supposed to mean "file kind was not detected or was unknown" then it would be better to print that instead of just leaving the field empty in the output. Examples:

  • due to being of unrecognized kind.
  • due to being of undetected kind.
  • due to being of unknown kind.
  • or even due to being of (skipped) kind.

I would also like to note that "type" is used more universally for this meaning instead of "kind"...

Issue Type
  • Bug Report
OS / ENVIRONMENT
ansible-lint --version
ansible-lint 6.14.4 using ansible 2.14.4
  • ansible installation method: pip
  • ansible-lint installation method: pip
STEPS TO REPRODUCE
  1. Create a role.
  2. Put some files in files/, for example 1 file with extension .ini and other file with extension .conf.
  3. Run ansible-lint -vv.
  4. Check output for missing "kind" for the .conf file.
Desired Behavior

Improve the message so that the "kind" is not left to empty which leaves 2 consecutive spaces in the output, instead use a suitable word such as "undetected", "unknown", "unrecognized", "(skipped)", etc in the field.

Possible security bugs should be reported via email to [email protected]

Actual Behavior
data set to None for roles/rolename/files/php.conf due to being of  kind.
@bluikko bluikko added bug new Triage required labels Apr 6, 2023
@audgirka audgirka removed the new Triage required label Apr 6, 2023
@audgirka audgirka self-assigned this Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants