Skip to content

Remove uncompiled C++ files and add CI script to detect

Dave Moxey requested to merge dmoxey/nektar:fix/missing-cpp-files into master

Issue/feature addressed

As part of the larger C++17 MR !1427 (closed), some uncompiled files were detected. This MR removes these and adds a script to the CI to detect them. This picked up some recently merged files, e.g. those in !1398 (merged).

Proposed solution

The relevant files have been removed, and a new script check-compiled-files.py has been added that uses compile_commands.json (used to drive clang-tidy) to detect uncompiled files.

Implementation

The script will search for all C++ and C files with extensions .cpp and .c within the library, tests, solvers and utilities directories. It ignores the following files:

ignore_sources = [
    # CADfix API
    "library/NekMesh/CADSystem/CFI/CADSystemCFI.cpp",
    "library/NekMesh/CADSystem/CFI/CADSurfCFI.cpp",
    "library/NekMesh/CADSystem/CFI/CADCurveCFI.cpp",
    "library/NekMesh/CADSystem/CFI/CADVertCFI.cpp",
    "library/NekMesh/Module/InputModules/InputCADfix.cpp",
    "library/NekMesh/Module/OutputModules/OutputCADfix.cpp",
    # Likwid
    "solvers/CompressibleFlowSolver/Utilities/TimeRiemann.cpp",
    "solvers/CompressibleFlowSolver/Utilities/TimeRoeKernel.cpp",
    # Template for PWS
    "solvers/PulseWaveSolver/EquationSystems/TemplatePressureArea.cpp",
]

Tests

A new runner has been added, and a CI uncompiled-files-template has been added (runs on Ubuntu Jammy by default).

Suggested reviewers

@ccantwel @CFD-Xing

Checklist

  • [ ] Functions and classes, or changes to them, are documented.
  • [ ] User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Dave Moxey

Merge request reports