Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codespell as a linter #1231

Merged
merged 2 commits into from
Mar 14, 2023
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
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ repos:
(?x)^(
^benchmarks/utilities/cxxopts.hpp
)
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
exclude: |
(?x)^(
pyproject.toml|
benchmarks/utilities/cxxopts.hpp
)
- repo: local
hooks:
- id: cmake-format
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/synchronization/synchronization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}

// Register the function as a benchmark. You will need to set the `UseManualTime()`
// flag in order to use the timer embeded in this class.
// flag in order to use the timer embedded in this class.
BENCHMARK(sample_cuda_benchmark)->UseManualTime();


Expand Down
2 changes: 1 addition & 1 deletion include/rmm/detail/stack_trace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
namespace rmm::detail {

/**
* @brief stack_trace is a class that will capture a stack on instatiation for output later.
* @brief stack_trace is a class that will capture a stack on instantiation for output later.
* It can then be used in an output stream to display stack information.
*
* rmm::detail::stack_trace saved_stack;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct crtp {
* This base class uses CRTP (https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern)
* to provide static polymorphism to enable defining suballocator resources that maintain separate
* pools per stream. All of the stream-ordering logic is contained in this class, but the logic
* to determine how memory pools are managed and the type of allocation is implented in a derived
* to determine how memory pools are managed and the type of allocation is implemented in a derived
* class and in a free list class.
*
* For example, a coalescing pool memory resource uses a coalescing_free_list and maintains data
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[tool.codespell]
# note: pre-commit passes explicit lists of files here, which this skip file list doesn't override -
# this is only to allow you to run codespell interactively
skip = "./pyproject.toml,./.git,./.github,./cpp/build,.*egg-info.*,./.mypy_cache,./benchmarks/utilities/cxxopts.hpp"
# ignore short words, and typename parameters like OffsetT
ignore-regex = "\\b(.{1,4}|[A-Z]\\w*T)\\b"
ignore-words-list = "inout"
builtin = "clear"
quiet-level = 3
2 changes: 1 addition & 1 deletion tests/device_buffer_tests.cu
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ TYPED_TEST(DeviceBufferTest, ResizeSmaller)

buff.shrink_to_fit(rmm::cuda_stream_default);
EXPECT_NE(nullptr, buff.data());
// A reallocation should have occured
// A reallocation should have occurred
EXPECT_NE(old_data, buff.data());
EXPECT_EQ(new_size, buff.size());
EXPECT_EQ(buff.capacity(), buff.size());
Expand Down
2 changes: 1 addition & 1 deletion tests/device_scalar_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ using Types = ::testing::Types<bool, int8_t, int16_t, int32_t, int64_t, float, d

TYPED_TEST_CASE(DeviceScalarTest, Types);

TYPED_TEST(DeviceScalarTest, Unitialized)
TYPED_TEST(DeviceScalarTest, Uninitialized)
{
rmm::device_scalar<TypeParam> scalar{this->stream, this->mr};
EXPECT_NE(nullptr, scalar.data());
Expand Down