stelligent/config-lint

issues with latest release

Closed this issue · 12 comments

EDIT: white this is likely still an issue, my current problem starts with the next comment

When running config-lint for terraform I currently get these for everything

  {
    "AssertionMessage": "At 6:10: Unknown token: 6:10 IDENT var.tags",
    "Category": "load",
    "CreatedAt": "2020-04-17T14:09:09Z",
    "Filename": "config.tf",
    "LineNumber": 0,
    "ResourceID": "config.tf",
    "ResourceType": "file",
    "RuleID": "FILE_LOAD",
    "RuleMessage": "Unable to load file",
    "Status": "FAILURE"
  },

running strace shows

epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc0001fe5ec) = -1 EPERM (Operation not permitted)

for every file that is raised, which is reasonable since epoll can not be run on normal files.

Any clue what is going on here? I'm on void linux (musl).

ok, I have to correct myself. Seems like I was on an old release (0.44). Updated to 1.0 now and running into this issue:

$ config-lint -terraform .
Failed to load built-in rules for Terraform: File or directory doesnt exist

seems to try to open something in /home/runner ? what should be in there?

this seems like the build is broken somehow tbh - I see that /home/runner only shows up in your github workflows. I assume that shouldn't be happening.

definitely tries to open some files in /home/runner/work/config-lint/config-lint/cli/assets/terraform

i'm trying to build it locally but still have some trouble

Replicated

~/config-lint/example-files/config# config-lint -debug -terraform
Looking for file terraform in Box: {./assets /home/runner/work/config-lint/config-lint/cli map[] map[]}
New Box: {./assets/terraform /home/runner/work/config-lint/config-lint/cli map[] map[]}
Failed to load built-in rules for Terraform: File or directory doesnt exist

so building it locally seems to work; will try once a new release is out if my initial issue is gone. If not I guess it's likely due to musl?

I'm working on a fix, it appears to be a relative pathing issue when referencing files in the packr box.

Thanks for raising the issue, we'll need to add better smoke tests as well.

sure, thx for the fast response; sh*t happens :) Trying it currently and for now it's really impressive 👍 Unlike tflint it actually finds something in our modules, which is great.

@kmonihen
im still seeing this in 1.1.0

config-lint -terraform main.tf -debug
Failed to load built-in rules for Terraform: File or directory doesnt exist
config-lint --version
1.1.0

@CubicNitrous
Please try with 1.2.0, the 1.1.0 release was cut without the fix

@kmonihen looks good in 1.2.0 thanks for the quick fix!

@AFriemann This should be fixed in 1.2.0. Thanks again for bringing it to our attention.