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

Git submodules as wordlist? #128

Closed
zfauser opened this issue Oct 20, 2022 · 7 comments
Closed

Git submodules as wordlist? #128

zfauser opened this issue Oct 20, 2022 · 7 comments
Assignees
Labels
question Further information is requested support Support not requiring code changes

Comments

@zfauser
Copy link

zfauser commented Oct 20, 2022

How would you use a git submodule as a wordlist, when I try to use it currently It always just returns that the wordlist could not be found.

@jonasbn
Copy link
Collaborator

jonasbn commented Oct 20, 2022

hi @zfauser do you have a public repository which demonstrating this?

My experience with submodules is limited and not full fond memories.

@zfauser
Copy link
Author

zfauser commented Oct 20, 2022

Hey, unfortunately I do not and it's not possible for me to make one of the existing repos public, sorry. What we are essentially doing though is writing code documentation which involves many things that are not recognized in the dictionary (I.e. 'const') and instead of everyone individually discovering each of these I figured having one document we all collaborated on would make sense. Do you know if this would be possible or maybe just a different way of doing it?

@jonasbn
Copy link
Collaborator

jonasbn commented Jan 8, 2023

Hi @zfauser

I have been thinking about this problem and think I have foundation a solution. It does require some code changes. More information will follow...

@jonasbn jonasbn self-assigned this Jan 8, 2023
@jonasbn jonasbn added the enhancement New feature or request label Jan 8, 2023
@jonasbn jonasbn pinned this issue Jan 22, 2023
@jonasbn
Copy link
Collaborator

jonasbn commented Jan 22, 2023

Hi @zfauser

Okay, here goes:

Using the config_path parameter for the GitHub action you can specify where you want your configuration to be placed.

name: Spellcheck Action
on: push
jobs:
  build:
    name: Spellcheck
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: rojopolis/spellcheck-github-actions@0.29.0
      name: Spellcheck
      with:
        config_path: config/spellcheck.yml # put path to configuration file here

So you can place it in a directory, which you handle as a git submodule.

The above is the file controlling your workflow/action located in: .github/workflows/

REF: documentation

Inside the configuration of the, you can set the path of the custom dictionary / wordlist. This is the file pointed to in the above configuration.

matrix:
- name: Markdown
  aspell:
    lang: en
  dictionary:
    wordlists:
    - config/wordlist.txt
    encoding: utf-8
  pipeline:
  - pyspelling.filters.markdown:
  - pyspelling.filters.html:
      comments: false
      ignores:
      - code
      - pre
  sources:
  - '**/*.md'
  default_encoding: utf-8

REF: documentation

So you can place the wordlist in a directory, which you handle as a git submodule.

Please let me know if this is unclear or does not work. I do not work with git submodules, so I do not have a working example, all of the above is just deducted from the documentation and is untested in git submodule context.

I will make some updates to the documentation to emphasize the flexibility taken advantage of to meet your request.

@jonasbn jonasbn closed this as completed Jan 22, 2023
@jonasbn jonasbn added question Further information is requested support Support not requiring code changes and removed enhancement New feature or request labels Jan 22, 2023
@jonasbn jonasbn unpinned this issue Jan 22, 2023
@jonasbn jonasbn reopened this Jan 22, 2023
@jonasbn
Copy link
Collaborator

jonasbn commented Jan 22, 2023

I am might have run into an issue with the above approach, I will need to do some more testing...

@jonasbn
Copy link
Collaborator

jonasbn commented Jan 22, 2023

Sorry about that, I am tired. I forgot to tell my local test to point to the moved configuration. I have a shell wrapper on the Docker image, which I call like so:

$ INPUT_CONFIG_PATH=".github/spellcheck.yml" spellchecker.sh

Forgot to set the environment variable, which is how the action configuration on GitHub communicates with the entry point in the Docker image.

@jonasbn jonasbn closed this as completed Jan 22, 2023
@jonasbn
Copy link
Collaborator

jonasbn commented Jan 22, 2023

Btw: you can see an example configuration here.

I believe you just have to isolate your configuration file(s) in a module you control as a git submodule and make the adjustments, then it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested support Support not requiring code changes
Projects
None yet
Development

No branches or pull requests

2 participants