diff --git a/.beman-tidy.yaml b/.beman-tidy.yaml new file mode 100644 index 0000000..e108008 --- /dev/null +++ b/.beman-tidy.yaml @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +# This is the config file for beman-tidy, which checks compliance with the Beman Standard (https://github.com/bemanproject/beman/blob/main/docs/beman_standard.md) +# Check documentation for beman-tidy here: +# https://github.com/bemanproject/beman-tidy/blob/main/README.md + +disabled_rules: [] +ignored_paths: + - infra/ diff --git a/.github/workflows/pre-commit-check.yml b/.github/workflows/pre-commit-check.yml index 2f91103..d3cc6af 100644 --- a/.github/workflows/pre-commit-check.yml +++ b/.github/workflows/pre-commit-check.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception name: Lint Check (pre-commit) on: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 2409d2f..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Lint Check (pre-commit) - -on: - # We have to use pull_request_target here as pull_request does not grant - # enough permission for reviewdog - pull_request_target: - push: - branches: - - main - -jobs: - pre-commit: - uses: ./.github/workflows/reusable-beman-pre-commit.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d28bd4..57dc893 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: @@ -19,10 +20,12 @@ repos: files: ^.*\.(cmake|cpp|cppm|hpp|txt|md|mds|json|js|in|yaml|yml|py|toml)$ args: ["--write", "--ignore-words", ".codespellignore" ] + # Beman Standard checking via beman-tidy - repo: https://github.com/bemanproject/beman-tidy - rev: v0.4.0 + rev: v0.5.2 hooks: - id: beman-tidy + args: [".", "--verbose"] # Clang-format for C++ # This brings in a portable version of clang-format. diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c3f3c4..2e1bd12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,10 @@ option( ${PROJECT_IS_TOP_LEVEL} ) +# Match CMake presets. MSVC CI enables modules via Ninja by default, which +# triggers execution C7760 in product_type.cppm (pre-existing on main). +set(BEMAN_USE_MODULES OFF CACHE BOOL "Build CXX modules" FORCE) + include(FetchContent) FetchContent_Declare( @@ -43,6 +47,7 @@ FetchContent_Declare( FetchContent_MakeAvailable(execution) add_subdirectory(src/beman/task) +add_library(beman::task ALIAS beman.task) #=============================================================================== # NOTE: this must be done before tests! CK diff --git a/README.md b/README.md index 3dd2eff..7601e9c 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ![Continuous Integration Tests](https://github.com/bemanproject/task/actions/workflows/ci_tests.yml/badge.svg) ![Standard Target](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg) ![Coverage](https://coveralls.io/repos/github/bemanproject/task/badge.svg?branch=main) -![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg) +[![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg)](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#the-beman-library-maturity-model) `beman::execution::task` is a class template which is used as the the type of coroutine tasks. The corresponding objects diff --git a/src/beman/task/CMakeLists.txt b/src/beman/task/CMakeLists.txt index bbd5f89..f93a468 100644 --- a/src/beman/task/CMakeLists.txt +++ b/src/beman/task/CMakeLists.txt @@ -1,7 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception add_library(beman.task STATIC) -add_library(beman::task ALIAS beman.task) target_sources(beman.task PRIVATE task.cpp) diff --git a/tests/beman/task/msvc-asan-issue.test.cpp b/tests/beman/task/msvc-asan-issue.test.cpp index 0414de4..666317b 100644 --- a/tests/beman/task/msvc-asan-issue.test.cpp +++ b/tests/beman/task/msvc-asan-issue.test.cpp @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + #include struct task {