Add behaviours to EnsureFilePermisions #3490
This file contains hidden or 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
| name: Static analysis | |
| on: [push, pull_request] | |
| jobs: | |
| analyze-static: | |
| name: Analyze Static Code | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/azure/azure-osconfig/ubuntu-22.04-amd64@sha256:0eed71cef37604c37186ec035974168a40a84d27e26d3b746a2858d99f305e2e | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| clean: true | |
| - name: Prepare compile command database | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug ../src | |
| - name: "Temporary: install clang-tools" | |
| run: | | |
| apt-get update | |
| apt-get install -y clang-tools | |
| - name: Run clang static analyzer | |
| run: | | |
| mkdir -p output | |
| analyze-build-14 --verbose \ | |
| --status-bugs \ | |
| --exclude src/adapters/pnp/azure-iot-sdk-c \ | |
| --exclude src/adapters/pnp/PnpUtils.c \ | |
| --exclude src/adapters/pnp/AisUtils.c \ | |
| --exclude src/common/parson \ | |
| --exclude src/modules/commandrunner/src/lib \ | |
| --cdb build/compile_commands.json \ | |
| --output output/scan-build | |
| - uses: actions/upload-artifact@v4 | |
| if: success() || failure() | |
| with: | |
| name: scan-build | |
| path: | | |
| output/scan-build |