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

feat: exclude files and dirs #115

Merged
merged 6 commits into from
Aug 16, 2023
Merged

feat: exclude files and dirs #115

merged 6 commits into from
Aug 16, 2023

Conversation

tk103331
Copy link
Contributor

@tk103331 tk103331 commented Aug 4, 2023

feature: Add ‘excludes’ flag to support excluding files or directories.

fix #86

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #115 (0c762cf) into master (3efe815) will increase coverage by 4.19%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #115      +/-   ##
==========================================
+ Coverage   83.74%   87.93%   +4.19%     
==========================================
  Files           8        8              
  Lines         406      431      +25     
==========================================
+ Hits          340      379      +39     
+ Misses         53       30      -23     
- Partials       13       22       +9     
Files Changed Coverage Δ
reviser/dir.go 65.00% <100.00%> (+65.00%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@incu6us
Copy link
Owner

incu6us commented Aug 10, 2023

hi @tk103331
thanks for your interest to the tool.
could you add some tests to cover the feature?

reviser/dir.go Outdated
@@ -73,6 +96,18 @@ func (d *SourceDir) walk(options ...SourceFileOption) fs.WalkDirFunc {
}
}

func (d *SourceDir) isExcluded(path string) bool {
if d.hasExcludes {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant param

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be removed

reviser/dir.go Outdated
dir: path,
isRecursive: isRecursive,
excludePatterns: patterns,
hasExcludes: len(patterns) > 0,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant param

@incu6us
Copy link
Owner

incu6us commented Aug 15, 2023

tests are failing. need to fix them. previous builds were successfully passed:
image

@incu6us incu6us merged commit 1743775 into incu6us:master Aug 16, 2023
11 checks passed
@tk103331 tk103331 deleted the feat_excludes branch August 17, 2023 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclude dirs in goimports recursive format
2 participants