Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid literal with _DISABLE_ERRORS_IF_LESS_THAN #359

Closed
omusavi opened this issue Mar 11, 2021 · 3 comments
Closed

invalid literal with _DISABLE_ERRORS_IF_LESS_THAN #359

omusavi opened this issue Mar 11, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@omusavi
Copy link
Contributor

omusavi commented Mar 11, 2021

Describe the bug
Setting the config value for the *_DISABLE_ERRORS_IF_LESS_THAN throws an error:

ValueError: invalid literal for int() with base 10: 'YAML_V8R_DISABLE_ERRORS_IF_LESS_THAN'

To Reproduce
Steps to reproduce the behavior:

  1. Create a YAML file with a single schema error in it
  2. Set YAML_V8R_DISABLE_ERRORS_IF_LESS_THAN: 1 in .mega-linter.yml
  3. Run mega-linter-runner

Expected behavior
Single error is ignored

Actual Behavior
Error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/megalinter/run.py", line 9, in <module>
    linter = megalinter.Megalinter({"cli": True})
  File "/megalinter/MegaLinter.py", line 94, in __init__
    self.load_linters()
  File "/megalinter/MegaLinter.py", line 336, in load_linters
    all_linters = linter_factory.list_all_linters(linter_init_params)
  File "/megalinter/linter_factory.py", line 30, in list_all_linters
    descriptor_linters = build_descriptor_linters(
  File "/megalinter/linter_factory.py", line 92, in build_descriptor_linters
    linter_instance = linter_class(linter_init_params, instance_attributes)
  File "/megalinter/Linter.py", line 213, in __init__
    self.load_config_vars()
  File "/megalinter/Linter.py", line 387, in load_config_vars
    self.disable_errors_if_less_than = int(
ValueError: invalid literal for int() with base 10: 'YAML_V8R_DISABLE_ERRORS_IF_LESS_THAN'

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
I tried this with other linters and ran into the same issue, so looks like a common problem because I believe this is a common property

@omusavi omusavi added the bug Something isn't working label Mar 11, 2021
@nvuillam
Copy link
Member

nvuillam commented Mar 12, 2021

Solved with 4.29.0 :) ( available in 30mn, the time the images ^^)
If you are in a hurry, you can use insiders version :)

@omusavi
Copy link
Contributor Author

omusavi commented Mar 12, 2021

Thanks for the quick fix!

@nvuillam
Copy link
Member

You're welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants