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

Sanity checks are performed on includes and excludes in precious.toml #42

Open
rafl opened this issue Dec 7, 2022 · 2 comments
Open

Comments

@rafl
Copy link

rafl commented Dec 7, 2022

To address the same concern as the external tool https://github.com/oalders/ppath/.

When using the git version control system, this can be achieved reasonably fast with a combination of calls to git ls-files and git check-ignore, as illustrated by a prototype implementation I wrote (https://houseabsolute.slack.com/archives/C2M2EM0LX/p1670442201584039 if you're on this slack - ask for an invite if you're curious).

We want:

  • there to exist a new command to check a precious config file for the issues ppath is trying to address
    • the new command to exit with a non-zero status when any issues are found
  • these checks to be performed by default on every tidy/lint run
    • any violation of the checks to be merely a warning
    • the checks to be fast
      • it's OK to be VCS-specific and to not initially support all VCSs that precious aims to support
@oalders
Copy link
Contributor

oalders commented Jul 10, 2024

I'm not sure that git ls-files can easily be used to check the include/exclude patterns in the config.

The config appears to be using file glob patterns. git ls-files would be using gitignore matching patterns. There is some overlap here, but there are some significant differences as well.

@oschwald
Copy link

I believe ignore::gitignore is used for the exclude paths, which, as the name suggests, uses the gitignore glob format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants