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

Update .gitignore and enhance PowerShell Script Analyzer settings. #273

Open
wants to merge 10 commits into
base: Development
Choose a base branch
from

Conversation

Sntai20
Copy link
Collaborator

@Sntai20 Sntai20 commented Feb 23, 2025

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 the PSScriptAnalyzerSettings.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.

Antonio Santana added 2 commits February 23, 2025 12:33
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.
@Sntai20 Sntai20 requested a review from jonnybottles February 23, 2025 21:29
@T0pCyber T0pCyber changed the base branch from master to Development February 23, 2025 22:02
@Sntai20 Sntai20 marked this pull request as ready for review February 23, 2025 22:09
@Sntai20 Sntai20 marked this pull request as draft February 23, 2025 22:38
@Sntai20 Sntai20 marked this pull request as ready for review February 23, 2025 22:38
Sntai20 and others added 8 commits March 2, 2025 15:48
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.
@Sntai20 Sntai20 requested a review from Copilot March 3, 2025 20:42

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 Sntai20 requested a review from T0pCyber March 3, 2025 20:43
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file contains the rules used to automate the cleanup of the code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a standard .gitignore file commonly used for repositories the use Visual Studio Code or Visual Studio.

Ignore Visual Studio temporary files, build results, and files generated by popular Visual Studio add-ons.
Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

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.

1 participant