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

[ci] check PowerShell scripts with PSScriptAnalyzer (part 3) #6710

Merged
merged 4 commits into from
Nov 3, 2024

Conversation

StrikerRUS
Copy link
Collaborator

Linking full original PR: #6700.
Continuation of #6709.

Closed #6498.
Closed #6700.

This PR fixes all remaining PowerShell linting issues (PSAvoidLongLines, PSAvoidUsingCmdletAliases, PSPlaceCloseBrace, PSPossibleIncorrectComparisonWithNull).

Helpful links with info about splitting long lines:

@@ -53,4 +53,4 @@ $settings = @{
}
}

Invoke-ScriptAnalyzer -Path "$env:BUILD_DIRECTORY/.ci" -Recurse -EnableExit -Settings $settings
Invoke-ScriptAnalyzer -Path ./ -Recurse -EnableExit -Settings $settings
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just for the consistency with other our linting scripts.

cpplint \
--filter=-build/c++11,-build/include_subdir,-build/header_guard,-whitespace/line_length \
--recursive ./src ./include ./R-package ./swig ./tests \
|| exit 1

mypy \
--config-file=./python-package/pyproject.toml \
./python-package \

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks! I agree, I think this makes the scripts a little easier to read.

@StrikerRUS StrikerRUS marked this pull request as ready for review November 1, 2024 11:11
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks! I left one very very small question, do whatever you want with it.

.ci/test-r-package-windows.ps1 Outdated Show resolved Hide resolved
Copy link
Collaborator Author

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

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

Enclose more paths

.ci/test-r-package-windows.ps1 Outdated Show resolved Hide resolved
.ci/test-r-package-windows.ps1 Outdated Show resolved Hide resolved
.ci/test-r-package-windows.ps1 Outdated Show resolved Hide resolved
.ci/test-windows.ps1 Outdated Show resolved Hide resolved
.ci/test-windows.ps1 Outdated Show resolved Hide resolved
.ci/test-windows.ps1 Outdated Show resolved Hide resolved
.ci/test-windows.ps1 Outdated Show resolved Hide resolved
.ci/test-windows.ps1 Outdated Show resolved Hide resolved
.ci/test-windows.ps1 Outdated Show resolved Hide resolved
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

re-approving, thanks for all the additional quoting.

@jameslamb jameslamb merged commit e007191 into master Nov 3, 2024
48 checks passed
@jameslamb jameslamb deleted the ci/psanalizer-3 branch November 3, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ci] enforce 'shellcheck' checks
2 participants