Questions tagged [linting]

8 questions
11
votes
5 answers

Is there a way to lint Terraform?

I'm hoping there is something to pick up when I have misspelled variables and comments to save me some time when I'm checking my code and reduce the potential for any errors. I normally use IntelliJ IDE for Terraform on a MAC but also have VS code…
doug
  • 523
  • 2
  • 6
  • 15
11
votes
1 answer

Assertions and constraints

I'm constructing a template to build a configuration file, and the service that consumes this file places constraints on identifier lengths. If an identifier is longer than, say, 6 characters, the service will get part-way through applying the…
Michael Mol
  • 1,045
  • 1
  • 8
  • 19
6
votes
3 answers

Terragrunt Linter

I'm having troubles using HCL files at VSCode. When I open the HCL file the indentations are messy. So I fix it and close the file, when I open again...messy again... Someone know a add-ons to works with HCL files? The official Terraform from…
Vader
  • 466
  • 3
  • 15
5
votes
2 answers

Coding conventions for docker-compose files?

Is there some globally admitted coding conventions for docker-compose files? Below is a sample docker-compose.yml from a small project we have here: version: 3 networks: net: driver: 'bridge' services: app: build: . networks: -…
Sylvain Leroux
  • 1,660
  • 2
  • 15
  • 27
5
votes
1 answer

Why does the jenkins-cli.jar linting functionality not work?

The jenkins-cli.jar has been downloaded. It is able to run. When one tries to check the syntax of a jenkinsfile by running java -jar ~/Desktop/jenkins-cli.jar -s https:// -noCertificateCheck declarative-linter < Jenkinsfile it results…
030
  • 13,383
  • 17
  • 76
  • 178
3
votes
1 answer

Incorporating python linter(flake8) in the CI/CD pipeline that use GitHub, Github Actions in a code base that is not in compliance

I have a codebase that is not in compliance with flake8. The CI/CD pipeline uses GitHub/GitHub actions. I would like to start adding python flake8 (to check for complexity, errors and code smells) progressively. How can I accomplish this task?
1
vote
1 answer

How to exclude a certain linenumber of an Ansible playbook when testing it using Molecule?

The aim is to exclude a certain line that contains a checksum and cannot be smaller than 80 characters. --> Scenario: 'default' --> Action: 'lint' --> Executing Yamllint on files found in /tmp/ansible-firefox/... …
030
  • 13,383
  • 17
  • 76
  • 178
0
votes
1 answer

gitlab -ci script not being updated on runner

I have a problem I can't get my head around in gitlab-ci: I have a monorepo where I store some infra code (IaC), in this repo I have a script which allow me to lint the saltstack states code, as : #!/bin/bash # Std var _hostname=$(hostname -f) for…
Pier
  • 344
  • 4
  • 16