espanso / hub

The official Espanso's package repository
MIT License
55 stars 141 forks source link

Add package `linter-control-comments` (Golint, Rubocop/Ruby, Clippy/Rust and Shellcheck) #132

Closed katrinleinweber closed 1 month ago

katrinleinweber commented 1 month ago

This is intended to provide editor-independent access to comments like # rubocop:disable …, //nolint:… etc. in order to control linter behaviour in source code files.

They make heavy use of the {clipboard}, into which one can copy a particular linting rule name (from docs, terminal output, etc.) before triggering the espansion.

Would this be a useful addition here?

PS: The specific snippets are just a rough start. Not necessarily complete with respect to what their respective docs list as available, nor based on any analysis of real-world usage.

smeech commented 1 month ago

Thank you, @katrinleinweber.

I've run the CI, which has passed, but this message is primarily to acknowledge your submission, and to let you know that as I'm about 10k miles from my PC, it'll probably be a couple of weeks before I can consider merging, unless someone else intervenes.

In the meantime, would you kindly add a homepage: key/value pair to _manifest.yml, even if it just points to https://github.com/katrinleinweber/espanso-hub/tree/package-linter-control-comments, as we've had problems merging some packages where this is omitted. Do make other amendments in the meantime if you wish. Perhaps add a "linter" tag.

I'm intrigued by your use of {clipboard} (with its single curly-braces) and how that works in comparison to the Espanso clipboard extension, and frustrated that I can't test it here!

katrinleinweber commented 1 month ago

Thanks for the clipboard hint, @smeech! I must have remembered it incorrectly, and fixed the syntax now.

smeech commented 1 month ago

Thank you! I thought I'd missed something!

For reference, a package of ten simple trigger/replacements utilising a clipboard global-variable. No script, cmd: or malicious code.

I'l approve for merge when I'm home in a couple of weeks.