rojopolis / spellcheck-github-actions

Spell check action
MIT License
132 stars 38 forks source link

Error after bumping from 13 to 19 #75

Closed gergelytakacs closed 2 years ago

gergelytakacs commented 2 years ago

Hello there. I am experiencing the following error after bumping from 13 to 19, can you help?

Using pyspelling on configuration outlined in >.spellcheck.yml<
Checking files matching specified outlined in >.spellcheck.yml<
----------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/bin/pyspelling", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/pyspelling/__main__.py", line 30, in main
    return run(
  File "/usr/local/lib/python3.10/site-packages/pyspelling/__main__.py", line 55, in run
    for results in spellcheck(
  File "/usr/local/lib/python3.10/site-packages/pyspelling/__init__.py", line 673, in spellcheck
    for result in spellchecker.run_task(task, source_patterns=sources):
  File "/usr/local/lib/python3.10/site-packages/pyspelling/__init__.py", line 311, in run_task
    self._build_pipeline(task)
  File "/usr/local/lib/python3.10/site-packages/pyspelling/__init__.py", line 255, in _build_pipeline
    raise ValueError(STEP_ERROR.format(str(step)))
ValueError: Pipline step in unexpected format: {'pyspelling.filters.python': None, 'comments': True, 'docstrings': True, 'group_comments': True, 'decode_escapes': True, 'strings': False, 'string_types': 'fu'}

Each pipeline step should be in the form {key: options: {}} not {key: {}, key2: {}}

Error: Files in repository contain spelling errors

Here is my config file: https://github.com/gergelytakacs/AutomationShield/actions/runs/1611803103/workflow

albertvolkman commented 2 years ago

I just resolved a similar issue for myself. It turned out that it was due to indentation. I'm thinking if you indent these lines-

https://github.com/gergelytakacs/AutomationShield/blob/master/.spellcheck.yml#L14-L19

It should (hopefully) fix it. Good luck!

facelessuser commented 2 years ago

Yeah, Yaml is nicer to manually write compared to JSON, but it is not without some unintuitive quirks. Most of the issues I see that people have with YAML is understanding how to properly indent things under lists and such.

jonasbn commented 2 years ago

@gergelytakacs I have created a PR (gergelytakacs/AutomationShield/pull/286) it should address the issue introduced with gergelytakacs/AutomationShield/pull/282

gergelytakacs commented 2 years ago

@jonasbn Thank you so much for the PR and for the help to others! The thing is, the indentation was not an issue in the previous version, thus I was suprised to see the rather uninformative error message:)

jonasbn commented 2 years ago

Hi @gergelytakacs

Since the action is just a wrapper for PySpelling, it would require some work to get to propagate errors more naturally. Currently I just document the different errors and remedies if possible in the Diagnostics section, at some point I hope to be able to dig into the errors and translate them better to the context of the GitHub Action.

gergelytakacs commented 2 years ago

Excellent, thank you for the clarification!

On Thu, Dec 23, 2021, 14:47 Jonas Brømsø @.***> wrote:

Hi @gergelytakacs https://github.com/gergelytakacs

Since the action is just a wrapper for PySpelling https://github.com/facelessuser/pyspelling, it would require some work to get to propagate errors more naturally. Currently I just document the different errors and remedies if possible in the Diagnostics https://github.com/rojopolis/spellcheck-github-actions#diagnostics section, at some point I hope to be able to dig into the errors and translate them better to the context of the GitHub Action.

— Reply to this email directly, view it on GitHub https://github.com/rojopolis/spellcheck-github-actions/issues/75#issuecomment-1000316422, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI7K24EOR3XBGL6HBS2YLBLUSMR6NANCNFSM5KSYDA6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>