-
Notifications
You must be signed in to change notification settings - Fork 128
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
Update .gitignore
and enhance PowerShell Script Analyzer settings.
#273
Open
Sntai20
wants to merge
10
commits into
Development
Choose a base branch
from
personal/ansantan/Code-Quality
base: Development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added comments for usage guidance and a reference link to the PowerShell Script Analyzer documentation. Modified the `Rules` hashtable to enable/disable various code style and syntax rules, enhancing code quality and maintainability.
Enhanced the .gitignore file to include a wide range of files and directories to be ignored by Git, focusing on Visual Studio, .NET development, and various tools. Added patterns for user-specific files, build results, test results, and temporary files. Removed a comment about VSCode settings and added an entry to ignore files related to resolving IP locations.
This commit includes formatting adjustments, such as removing unnecessary whitespace and ensuring consistent spacing around assignment operators. The `Hawk.psd1` file has been cleaned up for better readability, while the content remains unchanged. Several functions have been updated to enhance readability by adding spaces around operators and keywords. Error handling and logging messages have been refined for clarity, and comments have been added or modified for better context. The overall structure of the code has been improved to follow best practices, making it easier to read and maintain. Specific functions, including `Get-HawkTenantAdminEmailForwardingChange`, have had their parameters and logic adjusted for clarity. Additionally, updates to API response handling and error messages ensure the code behaves as expected in various scenarios. Co-authored-by: Antonio Santana <[email protected]>
- Removed unnecessary line breaks in `Convert-ReportToHTML.ps1` for streamlined XSLT transformation. - Improved readability in `Start-SleepWithProgress.ps1` by consolidating `$timeleft` calculation. - Applied similar formatting improvements throughout `install.ps1` for cleaner code structure. Co-authored-by: Antonio Santana <[email protected]>
…tation (#278) * Refactor using PSUseConsistentIndentation. This commit includes significant updates to the module manifest properties in `Hawk.psd1`, improving readability and structure. Various scripts have been refactored for clarity and maintainability. * Refactor Get-HawkTenantEntraIDAppAuditLog.ps1 for improved readability --------- Co-authored-by: Antonio Santana <[email protected]>
This commit updates multiple PowerShell scripts to include braces `{}` around `foreach` loops, conditional statements, and function definitions. These changes enhance code clarity and structure across various functions in the Hawk module, ensuring better maintainability and adherence to coding best practices. Additionally, some scripts have been updated to improve error handling and logging. Co-authored-by: Antonio Santana <[email protected]>
Corrected method names and parameters for consistency with PowerShell naming conventions. Updated logging functions for consistent casing and improved formatting. Enhanced code clarity and maintainability through minor adjustments and clearer comments. Co-authored-by: Antonio Santana <[email protected]>
Updated conditional checks in `install.ps1` to use `$null -ne variable` format. This change enhances code clarity and maintainability while preserving existing functionality. The modifications are applied consistently across multiple statements. Co-authored-by: Antonio Santana <[email protected]>
Added three rules to the PSScriptAnalyzerSettings.psd1 file: 'PSAvoidOverwritingBuiltInCmdlets', 'PSAvoidUsingInvokeExpression', and 'PSUseShouldProcessForStateChangingFunctions' are now excluded from analysis as they are not a priority at this time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 101 out of 101 changed files in this pull request and generated no comments.
Sntai20
commented
Mar 3, 2025
Sntai20
commented
Mar 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Classification
Update
.gitignore
and enhance PowerShell Script Analyzer settings.PR Summary
This pull request updates the
.gitignore
file to include additional patterns for ignoring files related to Visual Studio and other development tools, while also modifying thePSScriptAnalyzerSettings.psd1
to improve script analysis configurations..gitignore
: Added patterns for ignoring user-specific files, build results, and temporary files for various tools.PSScriptAnalyzerSettings.psd1
: Introduced new rules for script analysis, including maximum line lengths and comment help configurations.