Giter Club home page Giter Club logo

staticanalysis's People

Contributors

jacobdomagala avatar skrobinson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

staticanalysis's Issues

Optimization request: Use run-clang-tidy

For a medium project running clang-tidy as one process can lead to long waiting times (3 hours for example). I think this can be sped up with run-clang-tidy -j $(nproc)

Support for makefile based projects

My current project does not use CMake to build a makefile. Instead, we write the makefile since it's pretty complex. Is there a possibility of using make projects directly ?

I can execute cppcheck and clang-tidy to generate XML outputs. Can you add an option to parse the XML ?

Only works with pull requests

It would be nice if StaticAnalysis would work with other actions as well as PR. I'm trying out SA and want to repeatedly trigger it while I make changes to the configuraton. Either push or manual triggers would help during setup.

Checking multiple source files fails

I think there is an issue in entrypoint.sh with files_to_check, affecting debug_print and eval clang-tidy-12....

The problem shows up when trying to run clang-tidy over mutliple files and seems to be related to how get_files_to_check.py output is split when setting files_to_check. Everything works as expected for a single source file.

I have created a minimal failing case. Let me know if I can add any more information.

Update docker image

Update all packages to newer version. Also consider using Ubuntu 22.10

  • Cppcheck 2.9
  • clang-tidy-15
  • clang-15

Rewrite `get_files_to_check.py` script

Currently get_files_to_check.py is gathering the source files from compile_commands.json, but since that file only contains .cpp files, the clang-tidy is not checking header files.

Fix issue when passing multiple `CMake` args

Using something like following doesn't work:

        cmake_args: >
          -D CMAKE_BUILD_TYPE="DEBUG"
          -D Trilinos_ENABLE_ALL_PACKAGES=ON
          -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES=ON
          -D Trilinos_ALLOW_NO_PACKAGES=ON
          -D Trilinos_DISABLE_ENABLED_FORWARD_DEP_PACKAGES=ON
          -D Trilinos_IGNORE_MISSING_EXTRA_REPOSITORIES=ON
          -D Trilinos_ENABLE_TESTS=ON
          -D Trilinos_TEST_CATEGORIES=BASIC
          -D Trilinos_ENABLE_ALL_FORWARD_DEP_PACKAGES=ON
          -D Trilinos_VERBOSE_CONFIGURE=OFF
          -D BUILD_SHARED_LIBS:BOOL=ON
          -D Trilinos_WARNINGS_AS_ERRORS_FLAGS="-Wno-error"
          -D Trilinos_ENABLE_SEACAS=OFF
          -D Trilinos_ENABLE_Sacado=OFF
          -D TPL_ENABLE_BLAS=ON
          -D TPL_ENABLE_LAPACK=ON
          -D TPL_ENABLE_CUDA=OFF
          -D TPL_ENABLE_Matio=OFF
          -D TPL_ENABLE_X11=OFF
          -D TPL_ENABLE_Pthread=OFF
          -D TPL_ENABLE_Boost=OFF
          -D TPL_ENABLE_BoostLib=OFF
          -D TPL_ENABLE_ParMETIS=OFF
          -D TPL_ENABLE_Zlib=OFF
          -D TPL_ENABLE_HDF5=OFF
          -D TPL_ENABLE_Netcdf=OFF
          -D TPL_ENABLE_SuperLU=OFF
          -D TPL_ENABLE_Scotch=OFF
          -D TPL_ENABLE_MPI=ON
          -D Trilinos_ENABLE_Rythmos=OFF
          -D Trilinos_ENABLE_Pike=OFF
          -D Trilinos_ENABLE_Komplex=OFF
          -D Trilinos_ENABLE_TriKota=OFF
          -D Trilinos_ENABLE_Moertel=OFF
          -D Trilinos_ENABLE_Domi=OFF
          -D Trilinos_ENABLE_FEI=OFF
          -D Trilinos_ENABLE_PyTrilinos=OFF
          -D Trilinos_ENABLE_Epetra=OFF

We need to evaluate the cmake_args input

Improve the output from tests

What needs to be done:

  • Add PR comment for unit tests with result
  • Update TestRepo to contain proper code base and run a proper test there (dispatch workflow?)

traceback

With the last change to support different missing packages, I get this trace

+ python3 /run_static_analysis.py -cc cppcheck.txt -ct clang_tidy.txt
Traceback (most recent call last):
Changed files 32
  File "/run_static_analysis.py", line 231, in <module>
    files_changed_in_pr_in = setup_changed_files()
  File "/run_static_analysis.py", line 84, in setup_changed_files
    lines_changed_for_file = get_lines_changed_from_patch(file.patch)
  File "/run_static_analysis.py", line 60, in get_lines_changed_from_patch
    idx_end = line[idx_beg:].index(",")
ValueError: substring not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.