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

Improvements for local and test usage #279

Merged
merged 4 commits into from
Oct 4, 2024
Merged

Improvements for local and test usage #279

merged 4 commits into from
Oct 4, 2024

Conversation

pbrisbin
Copy link
Member

@pbrisbin pbrisbin commented Oct 4, 2024

Running something like restyle . was behaving oddly, including lots of
.git and node_modules, which I expected to be excluded.

This was due to a confluence of issues that don't occur when the list of
changed files in a PR are the arguments passed -- which is why I'd not
encountered the error before.

Basically, expansion of the . directory:

  1. Made everything come out prefixed by ./..., which causes excludes not to match
  2. Expanded nested hidden directories and included nested hidden files, which was unexpected

We still have some bugs in our excludes, which we inherit from
System.FilePath.Glob's implementation of **/, but fixing issue (2) there mostly
avoids them.


Truncate paths in debug messages

1696229

Normalise paths before processing excludes

94f0268

Avoid hidden files in expanding arguments

25c2510

This doesn't change anything when paths are given explicitly (such as in
the list of changed files on PRs), but when directories are given in
local or test usage, and we are expanding them, we now exclude hidden
files. I think this makes the most sense: match the behavior of a
recursive ls.

Version bump

2a6ce9c

This doesn't change anything when paths are given explicitly (such as in
the list of changed files on PRs), but when directories are given in
local or test usage, and we are expanding them, we now exclude hidden
files. I think this makes the most sense: match the behavior of a
recursive `ls`.
@pbrisbin pbrisbin changed the title pb/excludes Improvements for local and test usage Oct 4, 2024
@pbrisbin pbrisbin added the bugfix label Oct 4, 2024
@pbrisbin pbrisbin marked this pull request as ready for review October 4, 2024 12:35
@pbrisbin pbrisbin enabled auto-merge (rebase) October 4, 2024 12:35
@pbrisbin pbrisbin merged commit dce89ec into main Oct 4, 2024
7 checks passed
@pbrisbin pbrisbin deleted the pb/excludes branch October 4, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant