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

matlab-snippets #128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MistressOfUniverses
Copy link

A small package for espanso with triggers for headers and code snippets I constantly use in MATLAB

@smeech
Copy link
Collaborator

smeech commented Aug 20, 2024

A simple package with one global variable, five triggers and two forms. No shell commands, scripts or malicious code.

A number of problems, however. The CI generates the following errors:

Check: missing_mandatory_files
 ->: expected file 'package.yml' to be present inside package: matlab-snippets, but found none. File should be present in path: packages/matlab-snippets/0.1.0/package.yml
Check: incoherent_path
 ->: while parsing a flow sequence
  in "packages/matlab-snippets/0.1.0/_manifest.yml", line 6, column 7
expected ',' or ']', but got '<scalar>'
  in "packages/matlab-snippets/0.1.0/_manifest.yml", line 6, column 16
Check: missing_manifest_fields
 ->: while parsing a flow sequence
  in "packages/matlab-snippets/0.1.0/_manifest.yml", line 6, column 7
expected ',' or ']', but got '<scalar>'
  in "packages/matlab-snippets/0.1.0/_manifest.yml", line 6, column 16
Check: invalid_yaml
 ->: invalid YAML detected in file: packages/matlab-snippets/0.1.0/_manifest.yml, please make sure the file is formatted correctly. If you're unsure of the error, you can use http://www.yamllint.com/ to validate it.
Error: while parsing a flow sequence
  in "packages/matlab-snippets/0.1.0/_manifest.yml", line 6, column 7
expected ',' or ']', but got '<scalar>'
  in "packages/matlab-snippets/0.1.0/_manifest.yml", line 6, column 16

Essentially:

  • matlab-snippets.yml needs to be renamed to package.yml
  • The tags: items in _manifest.yml need to be separated by commas, not periods.
  • Additionally, I suggest removing "v0.1.0", "snippets" & "espanso", and add "math" and any other relevant tags from the examples at https://hub.espanso.org/search, to make the package easier to find there.
  • We're having problems with incomplete hub merging of packages whose _manifest.yml doesn't contain a homepage: item - would you kindly add one, even if it just points to https://github.com/MistressOfUniverses/hub/tree/MATLAB-snippets-package, please?
  • The forms each contain redundant lines where the text: item refers to a form field [[text]] which isn't present. These can be removed:
    form_fields:
      text:
        multiline: true
  • The indentation of the descriptions of the triggers in README.md causes markdown to format them as code, which means the lines don't wrap on-screen, and I think this makes them difficult to read. May I suggest formatting them differently? - have a look at other packages in https://github.com/espanso/hub/tree/main/packages for examples.

I'm sorry there's a bit of work to do before we can merge this package into the Hub but do let me know if I can help further!

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

Successfully merging this pull request may close these issues.

2 participants