Closed tannerli closed 3 years ago
Hello,
On first sight, no it does not relate to #32. I think I have found what's wrong but as such I'm surprised such an issue has not been raised so far. I'll try to figure this out.
The issue seems different from the one I though of: I just cannot reproduce your problem. I first expected an issue coming from static caching or so, but this is not the case. It seems that the underlying YAML linter gets a configuration larger than the simple, dynamically-calculated one containing only the rule to be checked. I expect this case to happen only if there is a local YAML lint configuration fie. So can you tell me if this is the case? Do you have a .yamllint
configuration file in your project?
So yes, that's it. I'm going to release a fix. BTW, this is an issue of the YAML plugin so you will have to install the new YAML plugin, not the Ansible plugin.
Version 1.6.1 released: can you test it, please?
Sorry for getting back late to you on this, i was on vacation last week. I'm extremely glad you took an interest in this. I will install the updated version and give feedback
Yes, the issue has been resolved with your fix. Thank you very much for the patch :+1:
We are running sonar-ansible 2.5.0 and
ansible-lint 5.2.0 using ansible 2.10.15
.There seems to be an issue with the reporting of certain issues, I've added an excerpt from a logfile of ours:
The result is, that the single line 69 is reported a whopping 17 times inside sonarqube. Each code smell is generated by one of the rules like HyphenCheck, BracktesCheck etc.
At first it looked like it might have to do something with #32, but the log looks to me like this is one single pass-through of main.yml
Any advice on how to fix this? If you could point me to the relevant place inside the code, I could maybe fix it myself and make a PR for you.