From a4dd4d60b4afcea8185bca773249bd1ec641d726 Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 10 Aug 2020 17:34:14 +0200 Subject: [PATCH] CI: moved static analysis to a separate project + fix (uninitialized variable, was harmless in this case). --- .github/workflows/build.yml | 35 ---------------------- .github/workflows/static-analysis.yml | 43 +++++++++++++++++++++++++++ docs/README.md | 3 +- imgui_internal.h | 1 + 4 files changed, 46 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/static-analysis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 274ca2a6..a404f465 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -398,38 +398,3 @@ jobs: source ./emsdk_env.sh popd make -C examples/example_emscripten - - Static-Analysis: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - - name: Install Dependencies - env: - PVS_STUDIO_LICENSE: ${{ secrets.PVS_STUDIO_LICENSE }} - run: | - if [[ "$PVS_STUDIO_LICENSE" != "" ]]; - then - echo "$PVS_STUDIO_LICENSE" > pvs-studio.lic - wget -q https://files.viva64.com/etc/pubkey.txt - sudo apt-key add pubkey.txt - sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.viva64.com/etc/viva64.list - sudo apt-get update - sudo apt-get install -y pvs-studio - fi - - - name: PVS-Studio static analysis - run: | - if [[ ! -f pvs-studio.lic ]]; - then - echo "PVS Studio license is missing. No analysis will be performed." - echo "If you have a PVS Studio license please create a project secret named PVS_STUDIO_LICENSE with your license." - echo "You may use a free license. More information at https://www.viva64.com/en/b/0457/" - exit 0 - fi - cd examples/example_null - pvs-studio-analyzer trace -- make WITH_EXTRA_WARNINGS=1 - pvs-studio-analyzer analyze -e ../../imstb_rectpack.h -e ../../imstb_textedit.h -e ../../imstb_truetype.h -l ../../pvs-studio.lic -o pvs-studio.log - plog-converter -a 'GA:1,2;OP:1' -t errorfile -w pvs-studio.log diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml new file mode 100644 index 00000000..7967d532 --- /dev/null +++ b/.github/workflows/static-analysis.yml @@ -0,0 +1,43 @@ +name: static-analysis + +on: + push: {} + pull_request: {} + schedule: + - cron: '0 9 * * *' + +jobs: + PVS-Studio: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + + - name: Install Dependencies + env: + PVS_STUDIO_LICENSE: ${{ secrets.PVS_STUDIO_LICENSE }} + run: | + if [[ "$PVS_STUDIO_LICENSE" != "" ]]; + then + echo "$PVS_STUDIO_LICENSE" > pvs-studio.lic + wget -q https://files.viva64.com/etc/pubkey.txt + sudo apt-key add pubkey.txt + sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.viva64.com/etc/viva64.list + sudo apt-get update + sudo apt-get install -y pvs-studio + fi + + - name: PVS-Studio static analysis + run: | + if [[ ! -f pvs-studio.lic ]]; + then + echo "PVS Studio license is missing. No analysis will be performed." + echo "If you have a PVS Studio license please create a project secret named PVS_STUDIO_LICENSE with your license." + echo "You may use a free license. More information at https://www.viva64.com/en/b/0457/" + exit 0 + fi + cd examples/example_null + pvs-studio-analyzer trace -- make WITH_EXTRA_WARNINGS=1 + pvs-studio-analyzer analyze -e ../../imstb_rectpack.h -e ../../imstb_textedit.h -e ../../imstb_truetype.h -l ../../pvs-studio.lic -o pvs-studio.log + plog-converter -a 'GA:1,2;OP:1' -t errorfile -w pvs-studio.log diff --git a/docs/README.md b/docs/README.md index 9579ee22..1259a638 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,7 @@ Dear ImGui ===== -[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)](https://github.com/ocornut/imgui/actions?workflow=build) +[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)](https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg)](https://github.com/ocornut/imgui/actions?workflow=static-analysis) + (This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added. If your company is using Dear ImGui, please consider reaching out.) diff --git a/imgui_internal.h b/imgui_internal.h index 5118d819..e923a6af 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1352,6 +1352,7 @@ struct ImGuiContext ActiveIdTimer = 0.0f; ActiveIdIsJustActivated = false; ActiveIdAllowOverlap = false; + ActiveIdNoClearOnFocusLoss = false; ActiveIdHasBeenPressedBefore = false; ActiveIdHasBeenEditedBefore = false; ActiveIdHasBeenEditedThisFrame = false;