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

refac(invoke-preprocessing.ps1): make code shorter and cleaner #2794

Conversation

momcilovicluka
Copy link
Contributor

Type of Change

  • New feature
  • Bug fix
  • Documentation update
  • Refactoring
  • Hotfix
  • Security patch
  • UI/UX improvement

Description

Refactor: tools/Invoke-Preprocessing.ps1
Simplify code and make it shorter

Testing

Test by running compile before and after along with custom Write-Output to ensure that files being processed are the same and that there is no behaviour change

Impact

Issue related to PR

  • Resolves #

Additional Information

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

Copy link
Contributor

@ruxunderscore ruxunderscore left a comment

Choose a reason for hiding this comment

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

#2813 Completely rewrites the this file as well. Was breaking under some versions of Powershell. I recommend closing this one, or refactoring based on the mentioned PR, if you still feel that there needs to be some shortening of code. That being said, be careful what you shorten, as sometimes that also makes the code less readable and/or hard-coded. I do like the implementation of foreach over the previous for loop for excluded file validation.

@momcilovicluka
Copy link
Contributor Author

CLOSED IN FAVOR OF #2813

Thanks for the review and advice. I wasn't aware of the other PR. I agree with your recommendation. I shall make suggestions to the aforementioned PR if need be.

@momcilovicluka momcilovicluka deleted the refac(invoke-preprocessing.ps1) branch October 1, 2024 12:22
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.

2 participants