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

Custom args are not working. #22

Open
hornmarc opened this issue Jan 11, 2023 · 1 comment
Open

Custom args are not working. #22

hornmarc opened this issue Jan 11, 2023 · 1 comment

Comments

@hornmarc
Copy link

I am trying to add my own custom set of words and alternate words and cannot seem to find the right combination to get this to work. I'd really like to use this as it is a great feature to have when writing.

Option 1:
I've attempted to add the words in the settings under Woke: Custom Args

master: main, primary, lead, leader
abort: stop, end, cancel
blacklist: deny list, blocked list
mouse: Mickey

This updates the settings.json file with the following entry:

"woke.customArgs": [
"master: main, primary, lead, leader",
"whitelist: allow list, allowed list, approve list, approved list",
"abort: stop, end, cancel",
"blacklist: deny list, blocked list",
"mouse"
],
"woke.run": "onType",

My words are not picked up.

Option 2:
I tried to add a custom dictionary file. Tried both JSON and YAML formatting.

File: /Users/me/Documents/customDictionary.txt

Contents:
master:

  • main
  • primary
  • lead
  • leader
    whitelist:
  • allow list
  • allowed list
  • approve list
  • approved list
    abort:
  • stop
  • end
  • cancel
    black day:
  • blocked day
    blacklist:
  • deny list
  • blocked list

No luck and I get this error now.

Woke: woke failed. Arguments: --stdin-0 json stderr:
Error: yaml: unmarshal errors: line 1: cannot unmarshal
!!str 'master....* into config. Config Usage: woke [globs
... [flags] Flags: -c, --config string Config file (default
is .woke.yaml in current directory, or $HOME) --debug
Enable debug logging -disable-default-rules Disable
the default ruleset-exit-1-on-failure Exit with exit
code on failures -h, -help help for woke --no-ignore
Ignored files in .gitignore, ignore, wokeignore,
git/info/exclude, and inline ignores are processed -O,
-output string Output type [text, simple, github-
actions,json, sonarqube,checkstyle] (default "text")
stdin Read from stdin -V, -- version version for woke

Option 3:

I tried adding the .woke.yaml and woke.yaml to my $HOME directory in JSON and YAML. This returns the same error. Tried this because the custom arg uses JSON.

Option 4:

I tried adding the woke.yaml file to my current directory and ran terminal command against a text.txt.

Contents:

  • name: slave
    terms:

    • slave
      alternatives:
    • follower
    • replica
    • standby
  • name: grandfathered
    terms:

    • grandfathered
      alternatives:
    • legacy status

What am I doing wrong and what should I be doing instead? I would love to use this extension, please help me correct what I am doing wrong.

Kind regards,

Marcus

@hornmarc
Copy link
Author

Update: When I try to use woke from the terminal I get the following odd error about the trashcan.

~ woke --version
woke version 0.19.0
~ woke test.txt
Error: open /Users/marcus/.Trash: operation not permitted
Usage:
woke [globs ...] [flags]

Flags:
-c, --config string Config file (default is .woke.yaml in current directory, or $HOME)
--debug Enable debug logging
--disable-default-rules Disable the default ruleset
--exit-1-on-failure Exit with exit code 1 on failures
-h, --help help for woke
--no-ignore Ignored files in .gitignore, .ignore, .wokeignore, .git/info/exclude, and inline ignores are processed
-o, --output string Output type [text,simple,github-actions,json,sonarqube,checkstyle] (default "text")
--stdin Read from stdin
-v, --version version for woke

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