Skip to content

Commit

Permalink
Merge pull request #9 from blimmer/fix/support-hidden-files
Browse files Browse the repository at this point in the history
fix: enable enforcement for hidden files and directories
  • Loading branch information
jamiebuilds committed Sep 14, 2021
2 parents b6bb451 + cb32f0f commit 125beb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- job: dist_darwin
displayName: "Dist Darwin binary"
pool:
vmImage: macOS-10.13
vmImage: macOS-10.14
steps:
- template: ci/azure-install-rust.yml
- script: cargo build --release
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ fn codeowners_enforcer(
override_builder.add(&format!("!{}", ignore_pattern))?;
}

// Always ignore .git directory
override_builder.add("!.git")?;

let overrides = override_builder.build()?;

// Create iterator that walks the file system using the search+ignore patterns
let walker = WalkBuilder::new(&cwd)
.add_custom_ignore_filename(".codeownersignore")
.hidden(false)
.parents(false)
.git_global(false)
.overrides(overrides)
Expand Down

0 comments on commit 125beb9

Please sign in to comment.