Skip to content

BUG - trailing-whitespace pre-commit hook excludes wrong directories and files #204

Description

@leowerneck

Description of the issue

The recently added pre-commit hook borrowed heavily from imap_processing and excludes incorrect paths from the check. In particular, while imap_processing/tests exists in that repository's root directory, imap_L3_processing/tests does not exist in this repository.

Steps to reproduce the issue

Running, for example:

uv sync --extra dev
uv run pre-commit install
uv run pre-commit run trailing-whitespace --all-files

will result in some 500 files being changed, several of which should've been excluded given the intention of the current exclusion rule.

Steps to fix the issue

Fix the regex in .pre-commit-config.yaml to properly ignore:

  • Data file trees such as instrument_team_data/ and test_data/
  • Test text files such as tests/*.txt
  • Data files (extensions: cdf, csf, csv, dat, tf, tls, ts, tsc, ...)
  • Documentation images such as docs/*.svg and docs/*.png
  • More? Less?

Activity

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

Metadata

Metadata

Assignees

Labels

Repo: TestingRelated to testingbugSomething isn't working

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions