question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: a special "<text>" value for the hooks.yaml "files" field

See original GitHub issue

Hi,

I had to implement this kind of “binary-files-filtering-out” today: https://github.com/Lucas-C/pre-commit-hooks/blob/master/pre_commit_hooks/utils.py#L10

So I made a quick overview of the existing checkers, and I found only 2 that are targeting any text file: end-of-file-fixer and trailing-whitespaces. Both use a long list of known text files suffixes.

If ever you think this use case could come in handy, I’d suggest to provide a magic value like <any text file> to the files parameter in hooks.yaml, so that hooks developers don’t have to re-implement this filtering each time.

You can freely re-use the code I mentioned above if it comes handy to you.

Also, sorry for the 3-issues-opened-in-a-row 😃 I got really excited by this tool and ideas for improvements just flowed in ! But they are really just humble features suggestions.

Cheers

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
asottilecommented, Jul 3, 2017

This is now available in 0.15.0 via types: [text].

0reactions
Lucas-Ccommented, Jul 2, 2017

Awesome ! Good job 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request: Add support for helm --set-string #119 - GitHub
Those values could get dumped to a yaml file and read into helm with a --values. ... Escaping special characters breaks --set array...
Read more >
10 YAML tips for people who hate YAML | Enable Sysadmin
Do you hate YAML? These tips might ease your pain. ... There are lots of formats for configuration files: a list of values,...
Read more >
Supported hooks - pre-commit
reorder-python-imports - This hook reorders imports in python files. ... github.com/jumanjihouse/pre-commit-hook-yamlfmt. yamlfmt - Format YAML files ...
Read more >
Core Features - Spring
This section dives into the details of Spring Boot. Here you can learn about the key features that you may want to use...
Read more >
Appendix: YAML Techniques - Helm
Most of this guide has been focused on writing the template language. Here, we'll look at the YAML format. YAML has some useful...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found