Skip to content

Commit d299bb1

Browse files
committed
added explanatory clause to NOLINTNEXTLINE comments
1 parent 037f6c2 commit d299bb1

File tree

11 files changed

+20
-20
lines changed

11 files changed

+20
-20
lines changed

bindings/pydrake/common/ref_cycle_pybind.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ class process_attribute<drake::pydrake::internal::ref_cycle<Peer0, Peer1>>
7575
: public process_attribute_default<
7676
drake::pydrake::internal::ref_cycle<Peer0, Peer1>> {
7777
public:
78-
// NOLINTNEXTLINE(runtime/references)
78+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
7979
static void precall(function_call& call) {
8080
// Only generate code if this invocation doesn't need the return value.
8181
if constexpr (!needs_return_value()) {
8282
drake::pydrake::internal::ref_cycle_impl(Peer0, Peer1, call, handle());
8383
}
8484
}
8585

86-
// NOLINTNEXTLINE(runtime/references)
86+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
8787
static void postcall(function_call& call, handle ret) {
8888
// Only generate code if this invocation *does* need the return value.
8989
if constexpr (needs_return_value()) {

bindings/pydrake/systems/builder_life_support_pybind.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class process_attribute<
138138
: public process_attribute_default<
139139
drake::pydrake::internal::builder_life_support_stash<T, Builder>> {
140140
public:
141-
// NOLINTNEXTLINE(runtime/references)
141+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
142142
static void postcall(function_call& call, handle ret) {
143143
drake::pydrake::internal::builder_life_support_stash_impl<T>(
144144
Builder, call, ret);

common/identifier.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class Identifier {
194194
confirm it is valid before using it as a key (or other hashing application).
195195
*/
196196
template <typename HashAlgorithm>
197-
// NOLINTNEXTLINE(runtime/references)
197+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
198198
friend void hash_append(HashAlgorithm& hasher, const Identifier& i) noexcept {
199199
using drake::hash_append;
200200
hash_append(hasher, i.value_);

common/symbolic/chebyshev_polynomial.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class ChebyshevPolynomial {
100100

101101
/** Implements the @ref hash_append concept. */
102102
template <class HashAlgorithm>
103-
// NOLINTNEXTLINE(runtime/references)
103+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
104104
friend void hash_append(HashAlgorithm& hasher,
105105
const ChebyshevPolynomial& item) noexcept {
106106
if (item.degree() == 0) {

common/type_safe_index.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ class TypeSafeIndex {
489489
/// the user to confirm it is valid before using it as a key (or other hashing
490490
/// application).
491491
template <typename HashAlgorithm>
492-
// NOLINTNEXTLINE(runtime/references)
492+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
493493
friend void hash_append(HashAlgorithm& hasher,
494494
const TypeSafeIndex& i) noexcept {
495495
using drake::hash_append;

common/value.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ struct ValueTraitsImpl<T, true> {
624624
return *other;
625625
}
626626
static const T& access(const Storage& storage) { return storage; }
627-
// NOLINTNEXTLINE(runtime/references)
627+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
628628
static T& access(Storage& storage) { return storage; }
629629
};
630630

@@ -655,7 +655,7 @@ struct ValueTraitsImpl<T, false> {
655655
return Storage{std::move(other)};
656656
}
657657
static const T& access(const Storage& storage) { return *storage; }
658-
// NOLINTNEXTLINE(runtime/references)
658+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
659659
static T& access(Storage& storage) { return *storage; }
660660
};
661661

geometry/benchmarking/render_benchmark.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class RenderBenchmark : public benchmark::Fixture {
7777
void SetUp(::benchmark::State&) { depth_cameras_.clear(); }
7878

7979
template <EngineType engine_type>
80-
// NOLINTNEXTLINE(runtime/references)
80+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
8181
void ColorImage(::benchmark::State& state, const std::string& name) {
8282
auto renderer = MakeEngine<engine_type>(bg_rgb_);
8383
auto [sphere_count, camera_count, width, height] = ReadState(state);
@@ -110,7 +110,7 @@ class RenderBenchmark : public benchmark::Fixture {
110110
}
111111

112112
template <EngineType engine_type>
113-
// NOLINTNEXTLINE(runtime/references)
113+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
114114
void DepthImage(::benchmark::State& state, const std::string& name) {
115115
auto renderer = MakeEngine<engine_type>(bg_rgb_);
116116
auto [sphere_count, camera_count, width, height] = ReadState(state);
@@ -139,7 +139,7 @@ class RenderBenchmark : public benchmark::Fixture {
139139
}
140140

141141
template <EngineType engine_type>
142-
// NOLINTNEXTLINE(runtime/references)
142+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
143143
void LabelImage(::benchmark::State& state, const std::string& name) {
144144
auto renderer = MakeEngine<engine_type>(bg_rgb_);
145145
auto [sphere_count, camera_count, width, height] = ReadState(state);

geometry/render_gl/internal_buffer_dim.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class BufferDim {
2525

2626
/* Implements the @ref hash_append concept. */
2727
template <class HashAlgorithm>
28-
// NOLINTNEXTLINE(runtime/references)
28+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
2929
friend void hash_append(HashAlgorithm& hasher,
3030
const BufferDim& dim) noexcept {
3131
using drake::hash_append;

multibody/benchmarking/cassie.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class Cassie : public benchmark::Fixture {
7878
// For T=double, any request for gradients is an error.
7979
// For T=AutoDiffXd, sets the specified gradients to the identity matrix.
8080
// For T=Expression, sets the specified quantities to symbolic variables.
81-
// NOLINTNEXTLINE(runtime/references)
81+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
8282
void SetUpGradientsOrVariables(benchmark::State& state);
8383

8484
// Use these functions to invalidate input- or state-dependent computations
@@ -97,7 +97,7 @@ class Cassie : public benchmark::Fixture {
9797
}
9898

9999
// Runs the PositionKinematics benchmark.
100-
// NOLINTNEXTLINE(runtime/references)
100+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
101101
void DoPositionKinematics(benchmark::State& state) {
102102
DRAKE_DEMAND(want_grad_vdot(state) == false);
103103
DRAKE_DEMAND(want_grad_u(state) == false);
@@ -111,7 +111,7 @@ class Cassie : public benchmark::Fixture {
111111
}
112112

113113
// Runs the PosAndVelKinematics benchmark.
114-
// NOLINTNEXTLINE(runtime/references)
114+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
115115
void DoPosAndVelKinematics(benchmark::State& state) {
116116
DRAKE_DEMAND(want_grad_vdot(state) == false);
117117
DRAKE_DEMAND(want_grad_u(state) == false);
@@ -126,7 +126,7 @@ class Cassie : public benchmark::Fixture {
126126
}
127127

128128
// Runs the MassMatrix benchmark.
129-
// NOLINTNEXTLINE(runtime/references)
129+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
130130
void DoMassMatrix(benchmark::State& state) {
131131
DRAKE_DEMAND(want_grad_vdot(state) == false);
132132
DRAKE_DEMAND(want_grad_u(state) == false);
@@ -137,7 +137,7 @@ class Cassie : public benchmark::Fixture {
137137
}
138138

139139
// Runs the InverseDynamics benchmark.
140-
// NOLINTNEXTLINE(runtime/references)
140+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
141141
void DoInverseDynamics(benchmark::State& state) {
142142
DRAKE_DEMAND(want_grad_u(state) == false);
143143
for (auto _ : state) {
@@ -147,7 +147,7 @@ class Cassie : public benchmark::Fixture {
147147
}
148148

149149
// Runs the ForwardDynamics benchmark.
150-
// NOLINTNEXTLINE(runtime/references)
150+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
151151
void DoForwardDynamics(benchmark::State& state) {
152152
DRAKE_DEMAND(want_grad_vdot(state) == false);
153153
for (auto _ : state) {

solvers/binding.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class Binding {
119119

120120
/** Implements the @ref hash_append concept. */
121121
template <class HashAlgorithm>
122-
// NOLINTNEXTLINE(runtime/references)
122+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
123123
friend void hash_append(HashAlgorithm& hasher,
124124
const Binding<C>& item) noexcept {
125125
using drake::hash_append;

solvers/solver_id.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SolverId {
3535

3636
/** Implements the @ref hash_append concept. */
3737
template <class HashAlgorithm>
38-
// NOLINTNEXTLINE(runtime/references)
38+
// NOLINTNEXTLINE(runtime/references) Per hash_append convention.
3939
friend void hash_append(HashAlgorithm& hasher,
4040
const SolverId& item) noexcept {
4141
using drake::hash_append;

0 commit comments

Comments
 (0)