Skip to content

Commit

Permalink
Fixes issue #1 related to missing name field in workflow step
Browse files Browse the repository at this point in the history
  • Loading branch information
bin3xish477 committed Jul 31, 2023
1 parent ad5c5be commit ee73337
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,4 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.vscode
10 changes: 7 additions & 3 deletions analyzer/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,13 @@ def _check_for_inline_script(self) -> bool:
for step in steps:
if "run" in step:
if self.verbose:
print(
f"{Colors.LIGHT_GRAY}INFO{Colors.END} found inline script in job('{job}').step('{step['name']}')"
)
# NOTE: name is not required according to GitHub Docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#name
if 'name' in step:
print(
f"{Colors.LIGHT_GRAY}INFO{Colors.END} found inline script in job('{job}').step('{step['name']}')"
)
else:
print(f"{Colors.LIGHT_GRAY}INFO{Colors.END} found step with inline script in job('{job}')")
passed = False
return passed

Expand Down

0 comments on commit ee73337

Please sign in to comment.