Skip to content

Commit

Permalink
Fix python lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Jan 26, 2022
1 parent 7f74ed5 commit 6fefb14
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions megalinter/linters/TfLintLinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
https://github.com/terraform-linters/tflint
"""
import logging
import os
import shutil
import subprocess
import sys

import megalinter

Expand All @@ -17,16 +13,12 @@ class TfLintLinter(megalinter.Linter):
# To execute before linting files
def before_lint_files(self):
# Build pre-command
tflint_init_command = 'tflint --init'
tflint_init_command = "tflint --init"
if self.config_file is not None:
tflint_init_command += f" --config {self.config_file}"
tflint_init_command += f" --config {self.config_file}"
logging.debug("tflint before_lint_files: " + tflint_init_command)
# Add to pre-commands
tflint_pre_command = {
"command": tflint_init_command,
"cwd": self.workspace
}
tflint_pre_command = {"command": tflint_init_command, "cwd": self.workspace}
if self.pre_commands is None:
self.pre_commands = []
self.pre_commands.append(tflint_pre_command)

0 comments on commit 6fefb14

Please sign in to comment.