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

small refactoring of findOne func #119

Merged
merged 8 commits into from
Mar 29, 2024
Merged

Conversation

SkobelkinYaroslav
Copy link
Contributor

  1. combined two if statements into one: made quick research, since we use filepath.WalkDir, there is no need in returning fs.SkipDir value
  2. removed strings.TrimPrefix. Under the hood it makes additional check, if string has pefix. Since we sure, that we always get file extension with dot, we don't need this check

@kehoecj kehoecj added the OSS Community Contribution Contributions from the OSS Community label Mar 25, 2024
@kehoecj kehoecj self-requested a review March 25, 2024 13:46
@kehoecj kehoecj added the waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers label Mar 27, 2024
Copy link
Contributor

@jd4235 jd4235 left a comment

Choose a reason for hiding this comment

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

Nice job. LGTM.

@kehoecj kehoecj removed the waiting-on-maintainer-review PR is waiting to be reviewed and functionally tested by the maintainers label Mar 29, 2024
Copy link
Collaborator

@kehoecj kehoecj left a comment

Choose a reason for hiding this comment

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

LGTM - did some local functional testing with different values for depth and exclude-dirs and everything looked good.

@kehoecj kehoecj merged commit e023ad0 into Boeing:main Mar 29, 2024
4 checks passed
@kehoecj
Copy link
Collaborator

kehoecj commented Mar 29, 2024

Thank you @SkobelkinYaroslav for another great PR!

shiina4119 pushed a commit to shiina4119/config-file-validator that referenced this pull request Aug 23, 2024
* changed []string to map[string]struct{} in FileSystemFinder struct fields because of optimization (arrays were used only to check the occurrence of an element)

* Changed field Extensions type in FileType from []string to map[string]struct{}

* added requested changes

* small refactoring of findOne func

* fixd the return value

* get back to trimprefix func

* cleanup

---------

Co-authored-by: Yaroslav <=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OSS Community Contribution Contributions from the OSS Community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants