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

Checks for problem-free yaml files do not pass. #284

Open
wakidas opened this issue Jul 31, 2022 · 0 comments
Open

Checks for problem-free yaml files do not pass. #284

wakidas opened this issue Jul 31, 2022 · 0 comments

Comments

@wakidas
Copy link

wakidas commented Jul 31, 2022

The configuration is written in pre_commit.yml, with additional yaml checks.
However, when I try to commit a yaml file (pre_commit.yml), which should be fine in syntax, I get an error.

Below is the pre_commit.yml and the error message.

pre_commit.yml

:checks_add:
- :rubocop
- :yaml
~/.rbenv/versions/3.1.0/lib/ruby/3.1.0/psych.rb:323:in `safe_load': wrong number of arguments (given 5, expected 1) (ArgumentError) from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/plugins/pre_commit/checks/yaml.rb:40:in `safe_load_file' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/plugins/pre_commit/checks/yaml.rb:30:in `load_file' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/plugins/pre_commit/checks/yaml.rb:21:in `block in call' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/plugins/pre_commit/checks/yaml.rb:21:in `map' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/plugins/pre_commit/checks/yaml.rb:21:in `call' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/pre-commit/runner.rb:47:in `block (2 levels) in execute' from ~/.rbenv/versions/3.1.0/lib/ruby/3.1.0/benchmark.rb:311:in `realtime' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/pre-commit/runner.rb:46:in `block in execute' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/pre-commit/runner.rb:43:in `map' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/pre-commit/runner.rb:43:in `execute' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/pre-commit/runner.rb:31:in `run_single' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/pre-commit/runner.rb:26:in `run' from ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/pre-commit-0.39.0/lib/pre-commit.rb:24:in `run' from -e:11:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant