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

Error: jq: error (at /tmp/tmp.cGzaIQjE6g.json:4): Cannot index string with string "user" #50

Open
ricardo-dematos opened this issue Mar 9, 2023 · 4 comments

Comments

@ricardo-dematos
Copy link

ricardo-dematos commented Mar 9, 2023

With release 0.0.21 I'm getting Error: jq: error (at /tmp/tmp.cGzaIQjE6g.json:4): Cannot index string with string "user".

There's just an annotation in job summary, because the step outcome is success.

Here's the step log :

Run check-spelling/check-spelling@v0.0.21
  with:
    event_aliases: {"workflow_call":"push"}
    config: .github/actions/check-spelling
    only_check_changed_files: 0
    post_comment: 0
    extra_dictionaries: cspell:en_GB/src/wordsEnGb.txt cspell:en_GB/src/additional_words.txt cspell:en_US/src/en_US.txt cspell:en_US/src/additional_words.txt cspell:en_US/src/contractions-and-possessives.txt cspell:en_US/src/hyphenated-words.txt cspell:pt_PT/Portuguese-European.txt cspell:software-terms/src/software-terms.txt cspell:software-terms/src/software-tools.txt cspell:software-terms/src/network-protocols.txt cspell:software-terms/src/network-os.txt cspell:cryptocurrencies/cryptocurrencies.txt cspell:public-licenses/src/generated/public-licenses.txt cspell:public-licenses/src/additional-licenses.txt cspell:lorem-ipsum/dictionary.txt cspell:mnemonics/src/mnemonics.txt cspell:companies/src/companies.txt cspell:aws/aws.txt cspell:docker/src/docker-words.txt cspell:bash/bash-words.txt cspell:fullstack/fullstack.txt cspell:django/django.txt cspell:django/requirements.txt cspell:node/additional_words.txt cspell:node/node.txt cspell:node/src/node-old.txt cspell:npm/npm.txt cspell:python/src/python/python.txt cspell:python/src/python/python-lib.txt cspell:python/src/common/extra.txt cspell:python/src/additional_words.txt cspell:typescript/typescript.txt cspell:html/html.txt cspell:html-symbol-entities/entities.txt cspell:css/css.txt cspell:fonts/fonts.txt cspell:filetypes/filetypes.txt
    GITHUB_TOKEN: ***
    experimental_path: .
    dictionary_url: https://raw.githubusercontent.com/check-spelling/check-spelling/dictionary-$DICTIONARY_VERSION/dict.txt
    dictionary_version: 20200211
    experimental_apply_changes_via_bot: 0
    experimental_parallel_jobs: 2
    dictionary_source_prefixes: {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/"}
    check_extra_dictionaries: cspell:ada/ada.txt cspell:aws/aws.txt cspell:bash/bash-words.txt cspell:clojure/src/clojure.txt cspell:companies/src/companies.txt cspell:cpp/src/compiler-clang-attributes.txt cspell:cpp/src/compiler-gcc.txt cspell:cpp/src/compiler-msvc.txt cspell:cpp/src/cpp.txt cspell:cpp/src/ecosystem.txt cspell:cpp/src/lang-jargon.txt cspell:cpp/src/lang-keywords.txt cspell:cpp/src/people.txt cspell:cpp/src/stdlib-c.txt cspell:cpp/src/stdlib-cerrno.txt cspell:cpp/src/stdlib-cmath.txt cspell:cpp/src/stdlib-cpp.txt cspell:cpp/src/template-strings.txt cspell:cryptocurrencies/cryptocurrencies.txt cspell:csharp/csharp.txt cspell:css/css.txt cspell:dart/src/dart.txt cspell:django/django.txt cspell:django/requirements.txt cspell:docker/src/docker-words.txt cspell:dotnet/dotnet.txt cspell:elixir/elixir.txt cspell:filetypes/filetypes.txt cspell:fonts/fonts.txt cspell:fullstack/fullstack.txt cspell:golang/go.txt cspell:haskell/haskell.txt cspell:html-symbol-entities/entities.txt cspell:html/html.txt cspell:java/java.txt cspell:latex/latex.txt cspell:latex/samples/sample-words.txt cspell:lorem-ipsum/dictionary.txt cspell:lua/lua.txt cspell:mnemonics/src/mnemonics.txt cspell:monkeyc/src/monkeyc_keywords.txt cspell:node/additional_words.txt cspell:node/node.txt cspell:node/src/node-old.txt cspell:npm/npm.txt cspell:php/php.txt cspell:powershell/powershell.txt cspell:public-licenses/src/additional-licenses.txt cspell:public-licenses/src/generated/public-licenses.txt cspell:python/src/additional_words.txt cspell:python/src/common/extra.txt cspell:python/src/python/python-lib.txt cspell:python/src/python/python.txt cspell:r/src/r.txt cspell:ruby/ruby.txt cspell:rust/rust.txt cspell:scala/scala.txt cspell:software-terms/src/network-os.txt cspell:software-terms/src/network-protocols.txt cspell:software-terms/src/software-terms.txt cspell:software-terms/src/software-tools.txt cspell:sql/src/sql.txt cspell:sql/src/tsql.txt cspell:swift/src/swift.txt cspell:typescript/typescript.txt cspell:win32/src/win32.txt
    extra_dictionary_limit: 5
    shortest_word: 3
    largest_file: 1048576
    unknown_word_limit: 5
    warnings: bad-regex,binary-file,deprecated-feature,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration
    notices: candidate-pattern
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.9.16/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.16/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.16/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.16/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.16/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.16/x64/lib
Run stdbuf -i0 -o0 -e0 "/home/runner/work/_actions/check-spelling/check-spelling/v0.0.21/unknown-words.sh"
  stdbuf -i0 -o0 -e0 "/home/runner/work/_actions/check-spelling/check-spelling/v0.0.21/unknown-words.sh"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.9.16/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.16/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.16/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.16/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.16/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.16/x64/lib
    INPUTS: {
    "event_aliases": "{\"workflow_call\":\"push\"}",
    "config": ".github/actions/check-spelling",
    "only_check_changed_files": "0",
    "post_comment": "0",
    "extra_dictionaries": "cspell:en_GB/src/wordsEnGb.txt cspell:en_GB/src/additional_words.txt cspell:en_US/src/en_US.txt cspell:en_US/src/additional_words.txt cspell:en_US/src/contractions-and-possessives.txt cspell:en_US/src/hyphenated-words.txt cspell:pt_PT/Portuguese-European.txt cspell:software-terms/src/software-terms.txt cspell:software-terms/src/software-tools.txt cspell:software-terms/src/network-protocols.txt cspell:software-terms/src/network-os.txt cspell:cryptocurrencies/cryptocurrencies.txt cspell:public-licenses/src/generated/public-licenses.txt cspell:public-licenses/src/additional-licenses.txt cspell:lorem-ipsum/dictionary.txt cspell:mnemonics/src/mnemonics.txt cspell:companies/src/companies.txt cspell:aws/aws.txt cspell:docker/src/docker-words.txt cspell:bash/bash-words.txt cspell:fullstack/fullstack.txt cspell:django/django.txt cspell:django/requirements.txt cspell:node/additional_words.txt cspell:node/node.txt cspell:node/src/node-old.txt cspell:npm/npm.txt cspell:python/src/python/python.txt cspell:python/src/python/python-lib.txt cspell:python/src/common/extra.txt cspell:python/src/additional_words.txt cspell:typescript/typescript.txt cspell:html/html.txt cspell:html-symbol-entities/entities.txt cspell:css/css.txt cspell:fonts/fonts.txt cspell:filetypes/filetypes.txt",
    "GITHUB_TOKEN": "***",
    "bucket": "",
    "project": "",
    "experimental_path": ".",
    "dictionary_url": "https://raw.githubusercontent.com/check-spelling/check-spelling/dictionary-$DICTIONARY_VERSION/dict.txt",
    "dictionary_version": "20200211",
    "debug": "",
    "experimental_apply_changes_via_bot": "0",
    "experimental_parallel_jobs": "2",
    "capture_output_unknown_words": "",
    "capture_output_stale_words": "",
    "capture_output_skipped_files": "",
    "dictionary_source_prefixes": "{\"cspell\": \"https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/\"}",
    "check_extra_dictionaries": "cspell:ada/ada.txt cspell:aws/aws.txt cspell:bash/bash-words.txt cspell:clojure/src/clojure.txt cspell:companies/src/companies.txt cspell:cpp/src/compiler-clang-attributes.txt cspell:cpp/src/compiler-gcc.txt cspell:cpp/src/compiler-msvc.txt cspell:cpp/src/cpp.txt cspell:cpp/src/ecosystem.txt cspell:cpp/src/lang-jargon.txt cspell:cpp/src/lang-keywords.txt cspell:cpp/src/people.txt cspell:cpp/src/stdlib-c.txt cspell:cpp/src/stdlib-cerrno.txt cspell:cpp/src/stdlib-cmath.txt cspell:cpp/src/stdlib-cpp.txt cspell:cpp/src/template-strings.txt cspell:cryptocurrencies/cryptocurrencies.txt cspell:csharp/csharp.txt cspell:css/css.txt cspell:dart/src/dart.txt cspell:django/django.txt cspell:django/requirements.txt cspell:docker/src/docker-words.txt cspell:dotnet/dotnet.txt cspell:elixir/elixir.txt cspell:filetypes/filetypes.txt cspell:fonts/fonts.txt cspell:fullstack/fullstack.txt cspell:golang/go.txt cspell:haskell/haskell.txt cspell:html-symbol-entities/entities.txt cspell:html/html.txt cspell:java/java.txt cspell:latex/latex.txt cspell:latex/samples/sample-words.txt cspell:lorem-ipsum/dictionary.txt cspell:lua/lua.txt cspell:mnemonics/src/mnemonics.txt cspell:monkeyc/src/monkeyc_keywords.txt cspell:node/additional_words.txt cspell:node/node.txt cspell:node/src/node-old.txt cspell:npm/npm.txt cspell:php/php.txt cspell:powershell/powershell.txt cspell:public-licenses/src/additional-licenses.txt cspell:public-licenses/src/generated/public-licenses.txt cspell:python/src/additional_words.txt cspell:python/src/common/extra.txt cspell:python/src/python/python-lib.txt cspell:python/src/python/python.txt cspell:r/src/r.txt cspell:ruby/ruby.txt cspell:rust/rust.txt cspell:scala/scala.txt cspell:software-terms/src/network-os.txt cspell:software-terms/src/network-protocols.txt cspell:software-terms/src/software-terms.txt cspell:software-terms/src/software-tools.txt cspell:sql/src/sql.txt cspell:sql/src/tsql.txt cspell:swift/src/swift.txt cspell:typescript/typescript.txt cspell:win32/src/win32.txt",
    "extra_dictionary_limit": "5",
    "shortest_word": "3",
    "longest_word": "",
    "experimental_commit_note": "",
    "suppress_push_for_open_pull_request": "",
    "report_title_suffix": "",
    "custom_task": "",
    "internal_state_directory": "",
    "check_file_names": "",
    "check_commit_messages": "",
    "anonymize_secpoll_source": "",
    "ignore_security_advisory": "",
    "largest_file": "1048576",
    "unknown_word_limit": "5",
    "warnings": "bad-regex,binary-file,deprecated-feature,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration",
    "notices": "candidate-pattern",
    "quit_without_error": "",
    "spell_check_this": "",
    "ssh_key": "",
    "checkout": "",
    "task": "",
    "disable_checks": "",
    "alternate_engine": "",
    "alternate_engine_key": "",
    "use_sarif": "",
    "use_magic_file": "",
    "caller_container": ""
  }
    DEBUG: 
    spellchecker: /home/runner/work/_actions/check-spelling/check-spelling/v0.0.21
    GH_ACTION_REPOSITORY: check-spelling/check-spelling
    GH_ACTION_REF: v0.0.21
Found ok status for version 0.0.21: 'OK'
Retrieving expect from .github/actions/check-spelling/expect/expect.txt
Retrieving excludes from .github/actions/check-spelling/excludes/excludes.txt
Downloaded https://raw.githubusercontent.com/check-spelling/check-spelling/dictionary-20200211/dict.txt (to /home/runner/work/_actions/check-spelling/check-spelling/v0.0.21/words)
(...Extra dictionaries...)
(...Check extra dictionaries...)
Retrieving allow from .github/actions/check-spelling/allow/allow.txt
Retrieving reject from .github/actions/check-spelling/reject/reject.txt
Retrieving line_forbidden from .github/actions/check-spelling/line_forbidden.patterns
Retrieving patterns from .github/actions/check-spelling/patterns/patterns.txt
Retrieving advice from .github/actions/check-spelling/advice.md
Checking spelling...
(...Spell check files...)
Checking 133 files
(...Spell check...)
Warning: backend/valiengine/parser/helpers/alt_grammar.txt:1:1 ... 1, Warning - Skipping `backend/valiengine/parser/helpers/alt_grammar.txt` because average line width (3996) exceeds the threshold (1000). (minified-file)
(...Compare expect with new output...)
(...New output...)
(...No misspellings...)
From https://github.com/valispace/valiengine
 * branch            HEAD       -> FETCH_HEAD

# @check-spelling-bot Report
See the [:open_file_folder: files](351/files/) view or the [:scroll:action log](https://github.com/valispace/valiengine/actions/runs/4376378607/jobs/7658401343#step:5:1)  for details.

No new words with misspellings found

There are currently 122 expected items.

<details><summary>Previously acknowledged words that are now absent
</summary>adamkdean addopts asgiref brpart corsheaders direnv einfo EXPRUNIT flightduration inlinevar ipynb libxmlsec modelist mypackage norecursedirs numprocesses prereleasemetadata prereleasetype prun pypackages regexes sast sonarqube sonarsource styfle svn testpaths typecheck typevar UNITTOEXPR updateonbuild vectorize vectorized viewset xdist xunit 
:arrow_right:
</details>

<details><summary>Some files were automatically ignored</summary>

These sample patterns would exclude them:

^\Qbackend/valiengine/parser/helpers/alt_grammar.txt\E$

You should consider adding them to:

.github/actions/check-spelling/excludes/excludes.txt


File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use `patterns.txt` to exclude portions, add items to the dictionary (e.g. by adding them to `allow.txt`), or fix typos.
</details>

<details><summary>Warnings (1)</summary>

See the [:open_file_folder: files](351/files/) view or the [:scroll:action log](https://github.com/valispace/valiengine/actions/runs/4376378607/jobs/7658401343#step:5:1) for details.

[:information_source: Warnings](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) | Count
-|-
[:information_source: minified-file](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions#minified-file) | 1

See [:information_source: Event descriptions](https://github.com/check-spelling/check-spelling/wiki/Event-descriptions) for more information.

</details>
Error: jq: error (at /tmp/tmp.cGzaIQjE6g.json:4): Cannot index string with string "user"

Screenshot (26)

Screenshot (27)

@jsoref
Copy link
Member

jsoref commented Mar 9, 2023

Not sure offhand.

It's possible it's this:

jq_comment_query='[ .[] | select(. | (.user.id=='"${comment_author_id:-0}"') and (.node_id != "'"$posted_comment_node_id"'") and (.body | test ("'"$comment_search_re"'") ) ) | .node_id ] | .[-1] // empty'

Could you set debug: 1?

debug:
description: 'Debug'
required: false

@ricardo-dematos
Copy link
Author

ricardo-dematos commented Mar 13, 2023

I'm sorry @jsoref , but my permissions to directly commit to a repo were revoked and since the team doesn't consider this a priority, I cannot afford to create a pull request to do your test... 😞

@jsoref
Copy link
Member

jsoref commented Mar 13, 2023

Hmm. Sorry to hear that. I'd be curious to know if you can reproduce in a fork of their repository with actions enabled. Or if the repository is something I can see, maybe a pointer and I can try to tinker with it.

Either way, thanks for reporting.

@ricardo-dematos
Copy link
Author

ricardo-dematos commented Mar 13, 2023

Hmm. Sorry to hear that. I'd be curious to know if you can reproduce in a fork of their repository with actions enabled. Or if the repository is something I can see, maybe a pointer and I can try to tinker with it.

It's commercial software, so almost all repo's are private and non forkable.


Personally, I consider 2 types of typos:

  • The writer does not know the correct spelling (can be easily overcome with a quick online search);
  • The writer knows how to spell the word, but mistypes it (can be easily overcome by reviewing what was written);

The latter one reveals someone that types fast and doesn't review what it writes or someone on a tight schedule. Either way, if it didn't pay attention to what it was written, how confident can another one be in that code? Are the typos the only errors?

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

2 participants