Skip to content

Commit 663a9b0

Browse files
authoredMar 14, 2023
Add codespell as a linter (#1231)
Following the example of rapidsai/cudf#12097, this PR adds [codespell](https://github.com/codespell-project/codespell) as a linter for rmm. Note: I have not included a section in the CONTRIBUTING.md about how to use this (as was done in cudf's PR) because I plan to overhaul the contributing guides for all RAPIDS repos in the near term, and have a single source in docs.rapids.ai with common information about linters used in RAPIDS. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Rong Ou (https://github.com/rongou) - Ben Frederickson (https://github.com/benfred) - Mark Harris (https://github.com/harrism) URL: #1231
1 parent 39f6ca5 commit 663a9b0

File tree

7 files changed

+23
-5
lines changed

7 files changed

+23
-5
lines changed
 

‎.pre-commit-config.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ repos:
4949
(?x)^(
5050
^benchmarks/utilities/cxxopts.hpp
5151
)
52+
- repo: https://github.com/codespell-project/codespell
53+
rev: v2.2.4
54+
hooks:
55+
- id: codespell
56+
exclude: |
57+
(?x)^(
58+
pyproject.toml|
59+
benchmarks/utilities/cxxopts.hpp
60+
)
5261
- repo: local
5362
hooks:
5463
- id: cmake-format

‎benchmarks/synchronization/synchronization.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
}
5151
5252
// Register the function as a benchmark. You will need to set the `UseManualTime()`
53-
// flag in order to use the timer embeded in this class.
53+
// flag in order to use the timer embedded in this class.
5454
BENCHMARK(sample_cuda_benchmark)->UseManualTime();
5555
5656

‎include/rmm/detail/stack_trace.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
namespace rmm::detail {
4040

4141
/**
42-
* @brief stack_trace is a class that will capture a stack on instatiation for output later.
42+
* @brief stack_trace is a class that will capture a stack on instantiation for output later.
4343
* It can then be used in an output stream to display stack information.
4444
*
4545
* rmm::detail::stack_trace saved_stack;

‎include/rmm/mr/device/detail/stream_ordered_memory_resource.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct crtp {
5858
* This base class uses CRTP (https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)
5959
* to provide static polymorphism to enable defining suballocator resources that maintain separate
6060
* pools per stream. All of the stream-ordering logic is contained in this class, but the logic
61-
* to determine how memory pools are managed and the type of allocation is implented in a derived
61+
* to determine how memory pools are managed and the type of allocation is implemented in a derived
6262
* class and in a free list class.
6363
*
6464
* For example, a coalescing pool memory resource uses a coalescing_free_list and maintains data

‎pyproject.toml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[tool.codespell]
2+
# note: pre-commit passes explicit lists of files here, which this skip file list doesn't override -
3+
# this is only to allow you to run codespell interactively
4+
skip = "./pyproject.toml,./.git,./.github,./cpp/build,.*egg-info.*,./.mypy_cache,./benchmarks/utilities/cxxopts.hpp"
5+
# ignore short words, and typename parameters like OffsetT
6+
ignore-regex = "\\b(.{1,4}|[A-Z]\\w*T)\\b"
7+
ignore-words-list = "inout"
8+
builtin = "clear"
9+
quiet-level = 3

‎tests/device_buffer_tests.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ TYPED_TEST(DeviceBufferTest, ResizeSmaller)
438438

439439
buff.shrink_to_fit(rmm::cuda_stream_default);
440440
EXPECT_NE(nullptr, buff.data());
441-
// A reallocation should have occured
441+
// A reallocation should have occurred
442442
EXPECT_NE(old_data, buff.data());
443443
EXPECT_EQ(new_size, buff.size());
444444
EXPECT_EQ(buff.capacity(), buff.size());

‎tests/device_scalar_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ using Types = ::testing::Types<bool, int8_t, int16_t, int32_t, int64_t, float, d
7171

7272
TYPED_TEST_CASE(DeviceScalarTest, Types);
7373

74-
TYPED_TEST(DeviceScalarTest, Unitialized)
74+
TYPED_TEST(DeviceScalarTest, Uninitialized)
7575
{
7676
rmm::device_scalar<TypeParam> scalar{this->stream, this->mr};
7777
EXPECT_NE(nullptr, scalar.data());

0 commit comments

Comments
 (0)