Skip to content

Commit

Permalink
ci: fixing path to clang on macos ; small improvements on the static …
Browse files Browse the repository at this point in the history
…analysis job
  • Loading branch information
SuperFola committed May 6, 2024
1 parent 26e9e6d commit ee41d83
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/launch-lizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
updated = []
anything_else = []

print(UPDATED_FILES)

for file in lizard.analyze(files):
for func in file.function_list:
filename = func.filename.replace('\\', '/')
filename = func.filename.replace('\\', '/').lstrip('./')
param_count = len(func.parameters)

if func.cyclomatic_complexity >= MAX_CCN or func.nloc >= MAX_NLOC or param_count >= MAX_PARAM:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/setup-compilers/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ runs:
shell: bash
run: |
if [[ '${{ startsWith(inputs.os_name, 'macos') }}' == 'true' ]]; then
echo "cc=/usr/local/opt/llvm@${{ inputs.compiler_version }}/bin/${{ inputs.compiler }}" >> $GITHUB_OUTPUT
echo "cxx=/usr/local/opt/llvm@${{ inputs.compiler_version }}/bin/${{ inputs.compiler }}++" >> $GITHUB_OUTPUT
echo "cc=/opt/homebrew/opt/llvm@${{ inputs.compiler_version }}/bin/${{ inputs.compiler }}" >> $GITHUB_OUTPUT
echo "cxx=/opt/homebrew/opt/llvm@${{ inputs.compiler_version }}/bin/${{ inputs.compiler }}++" >> $GITHUB_OUTPUT
elif [[ '${{ inputs.compiler }}' == 'clang' ]]; then
echo "cc=clang-${{ inputs.compiler_version }}" >> $GITHUB_OUTPUT
echo "cxx=clang++-${{ inputs.compiler_version }}" >> $GITHUB_OUTPUT
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: actions/setup-python@v5
with:
Expand All @@ -21,7 +23,7 @@ jobs:
id: lizard
shell: bash
run: |
content=$(python .github/launch-lizard.py $(git diff HEAD..dev --name-only))
content=$(python .github/launch-lizard.py $(echo $(git diff --name-only -r HEAD^1 HEAD)))
echo "LIZARD_REPORT<<EOF" >> $GITHUB_ENV
echo "$content" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand Down

0 comments on commit ee41d83

Please sign in to comment.