Skip to content

Commit c2781ff

Browse files
Merge pull request #1035 from luszczewskakasia1/rst-scan
RST scan
2 parents 8e22b4c + f72a613 commit c2781ff

File tree

11 files changed

+109
-14
lines changed

11 files changed

+109
-14
lines changed

.github/workflows/reusable_checks.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
sudo apt-get update
24-
sudo apt-get install -y black cmake clang-format-15 cmake-format libhwloc-dev
24+
sudo apt-get install -y black cmake clang-format-15 cmake-format libhwloc-dev doxygen
2525
2626
# Latest distros do not allow global pip installation
2727
- name: Install Python requirements in venv
2828
run: |
2929
python3 -m venv .venv
3030
. .venv/bin/activate
3131
echo "$PATH" >> $GITHUB_PATH
32+
python3 -m pip install -r third_party/requirements.txt
3233
python3 -m pip install bandit codespell
3334
3435
- name: Configure CMake
@@ -64,6 +65,12 @@ jobs:
6465
- name: Run codespell
6566
run: python3 ./.github/scripts/run-codespell.py
6667

68+
- name: Check spelling in docs
69+
run: |
70+
cmake -B build
71+
cmake --build build --target docs
72+
sphinx-build -b spelling ./build/docs_build/config ./build/docs_build/spelling_log -W
73+
6774
# Run Bandit recursively, but omit _deps directory (with 3rd party code) and python's venv
6875
- name: Run Bandit
6976
run: python3 -m bandit -r . -x '/_deps/,/.venv/'

docs/config/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ INLINE_SIMPLE_STRUCTS = NO
445445
# types are typedef'ed and only the typedef is referenced, never the tag name.
446446
# The default value is: NO.
447447

448-
TYPEDEF_HIDES_STRUCT = NO
448+
TYPEDEF_HIDES_STRUCT = YES
449449

450450
# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
451451
# cache is used to resolve symbols given their name and scope. Since this can be

docs/config/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ and operate on the provider.
8686
Fixed Memory Provider
8787
------------------------------------------
8888

89-
A memory provider that can provide memory from a given pre-allocated buffer.
89+
A memory provider that can provide memory from a given preallocated buffer.
9090

9191
.. doxygenfile:: provider_fixed_memory.h
9292
:sections: define enum typedef func var

docs/config/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636
# Add any Sphinx extension module names here, as strings. They can be
3737
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3838
# ones.
39-
extensions = ["breathe"]
39+
extensions = ["breathe", "sphinxcontrib.spelling"]
40+
41+
spelling_show_suggestions = True
42+
spelling_word_list_filename = "spelling_exceptions.txt"
4043

4144
# List of patterns, relative to source directory, that match files and
4245
# directories to ignore when looking for source files.

docs/config/examples.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ by a different library and the caller of the :any:`umfGetIPCHandle` function may
178178
The :any:`umfGetIPCHandle` function returns the IPC handle and its size. The IPC handle is a byte-copyable opaque
179179
data structure. The :any:`umf_ipc_handle_t` type is defined as a pointer to a byte array. The size of the handle
180180
might be different for different memory provider types. The code snippet below demonstrates how the IPC handle can
181-
be serialized for marshalling purposes.
181+
be serialized for marshaling purposes.
182182

183183
.. code-block:: c
184184

docs/config/spelling_exceptions.txt

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
addr
2+
allocatable
3+
allocator
4+
allocators
5+
calloc
6+
CXL
7+
copyable
8+
customizable
9+
daxX
10+
deallocation
11+
deallocating
12+
deallocations
13+
Devdax
14+
dev
15+
Globals
16+
hMemtarget
17+
hPool
18+
hProvider
19+
highPtr
20+
io
21+
interprocess
22+
ipc
23+
jemalloc
24+
lowPtr
25+
malloc
26+
maxnode
27+
mem
28+
mempolicies
29+
mempolicy
30+
Mempolicy
31+
memspace
32+
Memspace
33+
memspaces
34+
Memtarget
35+
memtarget
36+
memtargets
37+
middleware
38+
multithreading
39+
Nodemask
40+
nodemask
41+
numa
42+
oneAPI
43+
oneTBB
44+
os
45+
params
46+
partList
47+
pid
48+
poolable
49+
preallocated
50+
providerIpcData
51+
providential
52+
ptr
53+
realloc
54+
Scalable
55+
scalable
56+
stdout
57+
Tiering
58+
tiering
59+
topologies
60+
umf
61+
umfGetIPCHandle
62+
umfMemoryProviderAlloc
63+
umfMemoryProviderGetLastNativeError
64+
umfMemoryProviderOpenIPCHandle
65+
umfOsMemoryProviderParamsDestroy
66+
umfPool
67+
umfPoolCalloc
68+
umfPoolDestroy
69+
umfPoolGetTag
70+
umfPoolMallocUsableSize
71+
umfPoolRealloc
72+
umfMemspaceUserFilter
73+
umfMemspaceMemtargetAdd
74+
unfreed

include/umf/memory_pool.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2023-2024 Intel Corporation
3+
* Copyright (C) 2023-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -140,7 +140,7 @@ umf_result_t umfFree(void *ptr);
140140
/// * Implementations *must* store the error code in thread-local
141141
/// storage prior to returning NULL from the allocation functions.
142142
///
143-
/// * If the last allocation/de-allocation operation succeeded, the value returned by
143+
/// * If the last allocation/deallocation operation succeeded, the value returned by
144144
/// this function is unspecified.
145145
///
146146
/// * The application *may* call this function from simultaneous threads.

include/umf/pools/pool_disjoint.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
// Copyright (C) 2023-2024 Intel Corporation
2-
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
1+
/*
2+
*
3+
* Copyright (C) 2023-2025 Intel Corporation
4+
*
5+
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
6+
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
*
8+
*/
49

510
#pragma once
611
#ifdef __cplusplus
@@ -87,7 +92,7 @@ umfDisjointPoolParamsSetTrace(umf_disjoint_pool_params_handle_t hParams,
8792

8893
/// @brief Set shared limits for disjoint pool.
8994
/// @param hParams handle to the parameters of the disjoint pool.
90-
/// @param hSharedLimits handle tp the shared limits.
95+
/// @param hSharedLimits handle to the shared limits.
9196
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
9297
umf_result_t umfDisjointPoolParamsSetSharedLimits(
9398
umf_disjoint_pool_params_handle_t hParams,

include/umf/providers/provider_os_memory.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
/*
2-
* Copyright (C) 2022-2024 Intel Corporation
2+
*
3+
* Copyright (C) 2022-2025 Intel Corporation
34
*
45
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
56
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6-
*/
7+
*
8+
*/
79

810
#ifndef UMF_OS_MEMORY_PROVIDER_H
911
#define UMF_OS_MEMORY_PROVIDER_H
@@ -23,7 +25,7 @@ extern "C" {
2325
/// Not every mode is supported on every system.
2426
typedef enum umf_numa_mode_t {
2527
/// Default binding mode. Actual binding policy is system-specific. On
26-
/// linux this corresponds to MPOL_DEFAULT. If this mode is specified,
28+
/// Linux this corresponds to MPOL_DEFAULT. If this mode is specified,
2729
/// nodemask must be NULL and maxnode must be 0.
2830
UMF_NUMA_MODE_DEFAULT,
2931

scripts/check_license/file-exceptions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ grep -v -E -e 'benchmark/ubench.h' \
99
-e 'ChangeLog' \
1010
-e 'CODEOWNERS$' \
1111
-e 'docs/assets/.*' \
12+
-e 'docs/config/spelling_exceptions.txt' \
1213
-e 'docs/config/conf.py' \
1314
-e 'docs/config/Doxyfile' \
1415
-e 'include/umf/proxy_lib_new_delete.h' \

third_party/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ sphinxcontrib_qthelp==2.0.0
1515
breathe==4.35.0
1616
sphinx==8.1.3
1717
sphinx_book_theme==1.1.3
18+
# Spelling check in documentation
19+
pyenchant==3.2.2
20+
sphinxcontrib-spelling==8.0.0

0 commit comments

Comments
 (0)