Git Product home page Git Product logo

Comments (5)

geerlingguy avatar geerlingguy commented on September 27, 2024

Note that the easiest fix is to break the thing to multiple lines, but when you do, if you just use the folded scalar > then it adds a newline character to the end:

docker_apt_repository: >
  deb [arch={{ docker_apt_arch }}]
  https://download.docker.com/linux/{{ ansible_distribution|lower }}
  {{ ansible_distribution_release }}
  {{ docker_apt_release_channel }}

So instead, you have to use an even weirder construct:

docker_apt_repository: >-
  deb [arch={{ docker_apt_arch }}]
  https://download.docker.com/linux/{{ ansible_distribution|lower }}
  {{ ansible_distribution_release }}
  {{ docker_apt_release_channel }}

from galaxy-lint-rules.

awcrosby avatar awcrosby commented on September 27, 2024

I see from previous conversations ansible/ansible uses 160 for pylint and pep8, and we want to match that, so we will change this from 100 to 160. Also ansible-lint supports excluding certain tasks from being linted, that might not be the best approach but is an option for the 193 character task.

from galaxy-lint-rules.

geerlingguy avatar geerlingguy commented on September 27, 2024

@awcrosby good to know, as 160 is a better gate in general (though I usually use 120, I know a lot of people have gone wider in recent years).

The task exclusion works great, but the rules also apply to vars files like role defaults, and you sadly can't tag a variable—it would be interesting if you were able to exclude a particular line (e.g. a variable line) using a comment like # skip-ansible-lint or something. I know you can do this with other linters I use, e.g. phpcs has // phpcs:disable

from galaxy-lint-rules.

geerlingguy avatar geerlingguy commented on September 27, 2024

See upstream closed issue: ansible/ansible-lint#132

from galaxy-lint-rules.

geerlingguy avatar geerlingguy commented on September 27, 2024

All right, looks like this is taken care of by the commit above, plus the fact that ansible lint currently doesn't lint vars files—see ansible/ansible-lint#354 for progress on that issue.

from galaxy-lint-rules.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.