mschuchard / linter-ansible-linting

ansible-lint linter for pulsar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot skip certain lint rules

shrabok-surge opened this issue · comments

I'm having an issue where I cannot skip become_user requires become to work as expected rule.

I looked at the code and I think the issue is here:

// skip certain checks
        var skipList = ''
        for (i = 2; i <= 17; i++) {
          if (atom.config.get("linter-ansible-linting.ANSIBLE000" + i)) {
            skipList += "ANSIBLE000" + i + ",";
          }
        }
        if (skipList != '') {
          args = args.concat(['-x', skipList])
        }

Specifically "ANSIBLE000" + i

Currently if I run ansible lint manually it shows the rule as ANSIBLE0017, I believe with the way the code is performing skips it is comparing against ANSIBLE00017 which doesn't match and fails to skip that lint rule, and all numbers under 10 will skip.

Yeah I stopped testing the new skiprules at some point. I will get this fixed in the next commit.

Fixed in f7c77c0. You can apply a "hotfix" for this by taking the lib/main.js from this repo and placing it into your ~/.atom/packages/linter-ansible-linting/lib/main.js.