-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linting workflow and improve code quality
- Loading branch information
Showing
14 changed files
with
125 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: CI | ||
on: push | ||
|
||
jobs: | ||
lint: | ||
name: Lint with PSScriptAnalyzer | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install PSScriptAnalyzer module | ||
shell: pwsh | ||
run: | | ||
Set-PSRepository PSGallery -InstallationPolicy Trusted | ||
Install-Module PSScriptAnalyzer -ErrorAction Stop | ||
- name: Lint with PSScriptAnalyzer | ||
shell: pwsh | ||
run: | | ||
Invoke-ScriptAnalyzer -Path *.ps1 -Recurse -Outvariable issues | ||
$errors = $issues.Where({$_.Severity -eq 'Error'}) | ||
$warnings = $issues.Where({$_.Severity -eq 'Warning'}) | ||
if ($errors) { | ||
Write-Error "There were $($errors.Count) errors and $($warnings.Count) warnings total." -ErrorAction Stop | ||
} else { | ||
Write-Output "There were $($errors.Count) errors and $($warnings.Count) warnings total." | ||
} | ||
# test-windows: | ||
# name: Test on Windows | ||
# runs-on: windows-latest | ||
# steps: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ obs-studio/profiler_data | |
obs-studio/updates | ||
reports | ||
reports.zip | ||
venv |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.