Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
name: Build

on:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
name: clang-format

on:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/license-compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-License-Identifier: Apache-2.0
name: license-compliance

on:
push:
branches: [main, master]
pull_request:

jobs:
license-compliance:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Verify Apache-2.0 license compliance
run: bash ./scripts/check-license-compliance.sh
1 change: 1 addition & 0 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
name: Build Release Binaries

on:
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.28)

project(ArgumentManagerProject VERSION 1.0 LANGUAGES CXX)
Expand Down
875 changes: 201 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coretrace
Copyright 2026 Hugo Payet

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
1 change: 1 addition & 0 deletions cmake/CLI11.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
include(FetchContent)

FetchContent_Declare(
Expand Down
1 change: 1 addition & 0 deletions cmake/CoreTraceVersion.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
set(CORETRACE_VERSION_OVERRIDE "" CACHE STRING
"Explicit CoreTrace version string embedded in the binary")

Expand Down
1 change: 1 addition & 0 deletions cmake/FetchNlohmannJson.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
include(FetchContent)

FetchContent_Declare(
Expand Down
1 change: 1 addition & 0 deletions cmake/debug/sanitizer/AddressSanitizer.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
message(STATUS "AddressSanitizer enabled")
target_compile_options(ctrace PRIVATE -fsanitize=address -g -g3 -O1)
target_link_options(ctrace PRIVATE -fsanitize=address)
1 change: 1 addition & 0 deletions cmake/debug/sanitizer/ThreadSanitizer.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
message(STATUS "ThreadSanitizer enabled")
target_compile_options(ctrace PRIVATE -fsanitize=thread -g -g3 -O1)
target_link_options(ctrace PRIVATE -fsanitize=thread)
1 change: 1 addition & 0 deletions cmake/flawfinder.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
include(ExternalProject)

ExternalProject_Add(
Expand Down
1 change: 1 addition & 0 deletions cmake/httpLib.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
include(FetchContent)

FetchContent_Declare(
Expand Down
1 change: 1 addition & 0 deletions cmake/ikos.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
include(ExternalProject)

# GMP
Expand Down
1 change: 1 addition & 0 deletions cmake/logger/coretraceLog.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
set(CORETRACE_LOGGER_BUILD_EXAMPLES OFF CACHE BOOL "Disable logger examples" FORCE)
set(CORETRACE_LOGGER_BUILD_TESTS OFF CACHE BOOL "Disable logger tests" FORCE)

Expand Down
1 change: 1 addition & 0 deletions cmake/stackUsageAnalyzer.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
include(FetchContent)

FetchContent_Declare(
Expand Down
1 change: 1 addition & 0 deletions cmake/tscancode.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
include(ExternalProject)

ExternalProject_Add(
Expand Down
1 change: 1 addition & 0 deletions include/App/Config.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef APP_CONFIG_HPP
#define APP_CONFIG_HPP

Expand Down
1 change: 1 addition & 0 deletions include/App/Files.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef APP_FILES_HPP
#define APP_FILES_HPP

Expand Down
1 change: 1 addition & 0 deletions include/App/Runner.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef APP_RUNNER_HPP
#define APP_RUNNER_HPP

Expand Down
1 change: 1 addition & 0 deletions include/App/SupportedTools.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef APP_SUPPORTED_TOOLS_HPP
#define APP_SUPPORTED_TOOLS_HPP

Expand Down
1 change: 1 addition & 0 deletions include/App/ToolConfig.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef APP_TOOL_CONFIG_HPP
#define APP_TOOL_CONFIG_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ArgumentParser/ArgumentManager.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef ARGUMENTMANAGER_HPP
#define ARGUMENTMANAGER_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ArgumentParser/ArgumentParserFactory.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef ARGUMENTPARSERFACTORY_HPP
#define ARGUMENTPARSERFACTORY_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ArgumentParser/BaseArgumentParser.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef BASE_ARGUMENT_PARSER_HPP
#define BASE_ARGUMENT_PARSER_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ArgumentParser/CLI11/CLI11ArgumentParser.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef CLI11_ARGUMENT_PARSER_HPP
#define CLI11_ARGUMENT_PARSER_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ArgumentParser/GetOpt/GetOptArgumentParser.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef GETOPT_ARGUMENT_PARSER_HPP
#define GETOPT_ARGUMENT_PARSER_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ArgumentParser/IArgumentParser.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef IARGUMENTPARSER_HPP
#define IARGUMENTPARSER_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ArgumentParser/OptionInfo.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef OPTIONINFO_HPP
#define OPTIONINFO_HPP

Expand Down
1 change: 1 addition & 0 deletions include/Config/config.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef CONFIG_HPP
#define CONFIG_HPP

Expand Down
1 change: 1 addition & 0 deletions include/Process/Ipc/HttpServer.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
// server.cpp
#include <algorithm>
#include <atomic>
Expand Down
1 change: 1 addition & 0 deletions include/Process/Ipc/IpcStrategy.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef IPC_STRATEGY_HPP
#define IPC_STRATEGY_HPP

Expand Down
1 change: 1 addition & 0 deletions include/Process/LinuxProcess.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#pragma once

#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions include/Process/Process.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef PROCESS_HPP
#define PROCESS_HPP

Expand Down
1 change: 1 addition & 0 deletions include/Process/ProcessFactory.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef PROCESSFACTORY_HPP
#define PROCESSFACTORY_HPP

Expand Down
1 change: 1 addition & 0 deletions include/Process/ThreadProcess.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef THREAD_PROCESS_HPP
#define THREAD_PROCESS_HPP

Expand Down
1 change: 1 addition & 0 deletions include/Process/Tools/AnalysisTools.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef ANALYSIS_TOOLS_HPP
#define ANALYSIS_TOOLS_HPP

Expand Down
1 change: 1 addition & 0 deletions include/Process/Tools/AnalysisToolsBase.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "IAnalysisTools.hpp"
#include "../Ipc/IpcStrategy.hpp"

Expand Down
1 change: 1 addition & 0 deletions include/Process/Tools/IAnalysisTools.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef IANALYSISTOOLS_HPP
#define IANALYSISTOOLS_HPP

Expand Down
1 change: 1 addition & 0 deletions include/Process/Tools/ToolsInvoker.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef TOOLS_INVOKER_HPP
#define TOOLS_INVOKER_HPP

Expand Down
1 change: 1 addition & 0 deletions include/Process/UnixProcess.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#pragma once

#include <spawn.h>
Expand Down
1 change: 1 addition & 0 deletions include/Process/WinProcess.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#pragma once

#ifdef _WIN32
Expand Down
1 change: 1 addition & 0 deletions include/attributes.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef COMPILERLIB_ATTRIBUTES_HPP
#define COMPILERLIB_ATTRIBUTES_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ctrace_defs/types.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef TYPES_HPP
#define TYPES_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ctrace_tools/colors.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef COLORS_HPP
#define COLORS_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ctrace_tools/languageType.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef LANGUAGE_TYPE_HPP
#define LANGUAGE_TYPE_HPP

Expand Down
1 change: 1 addition & 0 deletions include/ctrace_tools/mangle.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include <string>
#include <vector>
#include <sstream>
Expand Down
1 change: 1 addition & 0 deletions include/ctrace_tools/strings.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#ifndef STRINGS_HPP
#define STRINGS_HPP

Expand Down
1 change: 1 addition & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "App/Config.hpp"
#include "App/Runner.hpp"

Expand Down
45 changes: 45 additions & 0 deletions scripts/check-license-compliance.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail

SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)"

cd "${REPO_ROOT}"

if [[ ! -f "LICENSE" ]]; then
echo "ERROR: Missing LICENSE file at repository root." >&2
exit 1
fi

if ! grep -Eq 'Apache License' LICENSE || ! grep -Eq 'Version 2\.0,[[:space:]]*January 2004' LICENSE; then
echo "ERROR: LICENSE file does not match Apache License 2.0 header markers." >&2
exit 1
fi

missing_spdx_headers=()

while IFS= read -r -d '' file; do
case "${file}" in
build/*|build-*/*|extern-project/build/*|extern-project/build-*/*|third_party/*|vendor/*|external/*)
continue
;;
CMakeLists.txt|main.cpp|*.c|*.cc|*.cpp|*.cxx|*.h|*.hh|*.hpp|*.hxx|*.ipp|*.tpp|*.cmake|*.sh|*.py|*.yml|*.yaml)
;;
*)
continue
;;
esac

if ! head -n 12 "${file}" | grep -Eq 'SPDX-License-Identifier:[[:space:]]*Apache-2\.0'; then
missing_spdx_headers+=("${file}")
fi
done < <(git ls-files -z)

if ((${#missing_spdx_headers[@]} > 0)); then
echo "ERROR: Missing Apache-2.0 SPDX headers in these files:" >&2
printf ' - %s\n' "${missing_spdx_headers[@]}" >&2
exit 1
fi

echo "License compliance checks passed."
1 change: 1 addition & 0 deletions scripts/format-check.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail

SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Expand Down
1 change: 1 addition & 0 deletions scripts/format.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail

SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Expand Down
1 change: 1 addition & 0 deletions src/App/Config.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "App/Config.hpp"
#include "App/ToolConfig.hpp"

Expand Down
1 change: 1 addition & 0 deletions src/App/Files.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "App/Files.hpp"

#include <filesystem>
Expand Down
1 change: 1 addition & 0 deletions src/App/Runner.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "App/Runner.hpp"

#include "App/Files.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/App/ToolConfig.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "App/ToolConfig.hpp"

#include "App/SupportedTools.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ArgumentParser/ArgumentManager.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "ArgumentParser/ArgumentManager.hpp"
#include <iostream>

Expand Down
1 change: 1 addition & 0 deletions src/ArgumentParser/ArgumentParserFactory.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "ArgumentParser/ArgumentParserFactory.hpp"
#include "ArgumentParser/CLI11/CLI11ArgumentParser.hpp"
#include "ArgumentParser/GetOpt/GetOptArgumentParser.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ArgumentParser/BaseArgumentParser.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "ArgumentParser/BaseArgumentParser.hpp"
#include <cstdio>

Expand Down
1 change: 1 addition & 0 deletions src/ArgumentParser/CLI11/CLI11ArgumentParser.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "ArgumentParser/BaseArgumentParser.hpp"
#include "ArgumentParser/OptionInfo.hpp"
#include "../../../external/CLI11.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ArgumentParser/GetOpt/GetoptArgumentParser.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include <string>
#include <cstdint>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions src/Process/Tools/StackAnalyzerToolImplementation.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "Process/Tools/AnalysisTools.hpp"
#include "app/AnalyzerApp.hpp"

Expand Down
1 change: 1 addition & 0 deletions src/Process/Tools/TscancodeToolImplementation.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "Process/Tools/AnalysisTools.hpp"

#include <unordered_map>
Expand Down
1 change: 1 addition & 0 deletions src/ctrace_tools/languageType.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "ctrace_tools/languageType.hpp"

namespace ctrace_tools
Expand Down
1 change: 1 addition & 0 deletions src/ctrace_tools/mangle.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "ctrace_tools/mangle.hpp"

namespace ctrace_tools::mangle
Expand Down
1 change: 1 addition & 0 deletions src/ctrace_tools/strings.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
#include "ctrace_tools/strings.hpp"

namespace ctrace_tools
Expand Down
1 change: 1 addition & 0 deletions tests/AvoidDefaultArgumentsOnVirtualMethods.hh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
class Base
{
public:
Expand Down
1 change: 1 addition & 0 deletions tests/DestructorOfVirtualClass.hh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
class Base
{
public:
Expand Down
Loading
Loading