Remove rst files

This commit is contained in:
Valtteri Karesto
2022-03-08 09:54:11 +02:00
parent 395e02343b
commit 12a24d3d86
40 changed files with 0 additions and 435 deletions

View File

@@ -1,10 +0,0 @@
.. title:: clang-tidy - hooks-account-buf-len
hooks-account-buf-len
=====================
Function `hook_account` has fixed-size account ID output.
This check warns about too-small size of its output buffer (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,10 +0,0 @@
.. title:: clang-tidy - hooks-account-conv-buf-len
hooks-account-conv-buf-len
==========================
Function `util_raddr` has fixed-size account ID input.
This check warns unless the correct size is passed in the input size
parameter (if it's specified by a constant - variable parameter is
ignored).

View File

@@ -1,13 +0,0 @@
.. title:: clang-tidy - hooks-account-conv-pure
hooks-account-conv-pure
=======================
Hooks identify accounts by the 20 byte account ID, which can be
converted to an raddr using the `util_raddr` function. If the account
ID never changes, a more efficient way to do this is precompute the
raddr from the account ID.
This check warns about calls of `util_raddr` with constant input and
proposes to add a tracing statement showing the computed value (so
that the user can use it to replace the call).

View File

@@ -1,12 +0,0 @@
.. title:: clang-tidy - hooks-array-buf-len
hooks-array-buf-len
===================
Hook API `sto_subarray` requires non-empty input buffer and takes a
parameter specifying the array index, whose value is limited - the
sought object cannot be found if the limit is exceeded.
This check warns about empty input as well as too-large values of the
index specified in calls to `sto_subarray` (if they're specified by
constants - variable parameters are ignored).

View File

@@ -1,8 +0,0 @@
.. title:: clang-tidy - hooks-burden-prereq
hooks-burden-prereq
===================
Hook API `etxn_burden` computes transaction burden, based on (i.a.)
the number of reserved transactions, so a call to it must be preceded
by a call to `etxn_reserve`.

View File

@@ -1,9 +0,0 @@
.. title:: clang-tidy - hooks-detail-buf-len
hooks-detail-buf-len
====================
Function `etxn_details` has fixed-size sfEmitDetails output.
This check warns about too-small size of its output buffer (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,8 +0,0 @@
.. title:: clang-tidy - hooks-detail-prereq
hooks-detail-prereq
===================
Hook API `etxn_details` serializes emit details, based on (i.a.) the
number of reserved transactions, so a call to it must be preceded by a
call to `etxn_reserve`.

View File

@@ -1,10 +0,0 @@
.. title:: clang-tidy - hooks-emit-buf-len
hooks-emit-buf-len
==================
Function `emit` has fixed-size transaction hash output.
This check warns about too-small size of its output buffer (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,8 +0,0 @@
.. title:: clang-tidy - hooks-emit-prereq
hooks-emit-prereq
=================
Before emitting a transaction using `emit` Hook API, a hook must set a
maximal count of transactions it plans to emit, by calling
`etxn_reserve`.

View File

@@ -1,7 +0,0 @@
.. title:: clang-tidy - hooks-entry-point-recursion
hooks-entry-point-recursion
===========================
Recursive calls are disallowed in the implementation of hook entry
points.

View File

@@ -1,7 +0,0 @@
.. title:: clang-tidy - hooks-entry-points-neg
hooks-entry-points-neg
======================
Shows error on function definitions with unexpected (that is, neither
`hook` nor `cbak`) names.

View File

@@ -1,9 +0,0 @@
.. title:: clang-tidy - hooks-entry-points
hooks-entry-points
==================
A Hook always implements and exports exactly two functions: `cbak` and
`hook`.
This check shows error on translation units that do not have them.

View File

@@ -1,8 +0,0 @@
.. title:: clang-tidy - hooks-fee-prereq
hooks-fee-prereq
================
Hook API `etxn_fee_base` estimates a transaction fee, based on (i.a.)
the number of reserved transactions, so a call to it must be preceded
by a call to `etxn_reserve`.

View File

@@ -1,12 +0,0 @@
.. title:: clang-tidy - hooks-field-add-buf-len
hooks-field-add-buf-len
=======================
Emplacing a new field into STObject by calling `sto_emplace` requires
enough space to serialize the new STObject into; the API also limits
sizes of the old object and field.
This check warns about insufficient output buffer space as well as
too-large values of the inputs in calls to `sto_emplace` (if they're
specified by constants - variable parameters are ignored).

View File

@@ -1,10 +0,0 @@
.. title:: clang-tidy - hooks-field-buf-len
hooks-field-buf-len
===================
Hook API `sto_subfield` requires non-empty input buffer.
This check warns about empty input in calls to `sto_subfield` (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,12 +0,0 @@
.. title:: clang-tidy - hooks-field-del-buf-len
hooks-field-del-buf-len
=======================
Erasing a field from STObject by calling `sto_erase` requires enough
space to serialize the new STObject into; the API also limits size of
the old object.
This check warns about insufficient output buffer space as well as
too-large value of the input STObject in calls to `sto_erase` (if
they're specified by constants - variable parameters are ignored).

View File

@@ -1,18 +0,0 @@
.. title:: clang-tidy - hooks-float-arith-pure
hooks-float-arith-pure
======================
Hooks can compute floating-point values in XFL format by calling
functions `float_multiply`, `float_mulratio`, `float_negate`,
`float_sum`, `float_invert` and `float_divide` and access their
constituent parts by calling `float_exponent`, `float_mantissa` and
`float_sign`. If the inputs of the computation never change, a more
efficient way to do this is to precompute it.
This check warns about calls of the aforementioned functions with
constant inputs and in simple cases proposes to add a tracing
statement showing the computed value (so that the user can use it to
replace the call). It also checks that the divisor passed to
`float_divide`, `float_mulratio` and `float_invert` is not 0 (if it's
specified by a constant - variable parameters are ignored).

View File

@@ -1,12 +0,0 @@
.. title:: clang-tidy - hooks-float-compare-pure
hooks-float-compare-pure
========================
Hooks can compare floating-point values in XFL format by calling the
`float_compare` function. If the inputs of the comparison never
change, its result is fixed and the function need not be called.
This check warns about calls of `float_compare` with constant inputs
as well as invalid values of the comparison mode parameter (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,14 +0,0 @@
.. title:: clang-tidy - hooks-float-int-pure
hooks-float-int-pure
====================
Hooks can convert floating-point values in XFL format to integers by
calling the `float_int` function. If the inputs of this function never
change, a more efficient way to do this is to precompute the integer
value.
This check warns about calls of `float_int` with constant inputs as
well as invalid values of the decimal places parameter (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,16 +0,0 @@
.. title:: clang-tidy - hooks-float-manip-pure
hooks-float-manip-pure
======================
Hooks can directly manipulate floating-point values in XFL format by
calling functions `float_exponent_set`, `float_mantissa_set` and
`float_sign_set`. If the inputs of the update never change, a more
efficient way to do this is to precompute it.
This check warns about calls of the aforementioned functions with
constant inputs and in simple cases proposes to add a tracing
statement showing the computed value (so that the user can use it to
replace the call). It also checks documented bounds of the second
parameter of these functions (if it's specified by a constant -
variable parameter is ignored).

View File

@@ -1,8 +0,0 @@
.. title:: clang-tidy - hooks-float-one-pure
hooks-float-one-pure
====================
Hooks can obtain XFL enclosing number 1 by calling the float_one
function. Since the number never changes, a more efficient way is to
use its precomputed value.

View File

@@ -1,15 +0,0 @@
.. title:: clang-tidy - hooks-float-pure
hooks-float-pure
================
Hooks can use floating-point values in XFL format, creating them from
mantissa and exponent by calling the `float_set` function. If the
mantissa and exponent never change, a more efficient way to do this is
to precompute the floating-point value.
This check warns about calls of `float_set` with constant inputs and
proposes to add a tracing statement showing the computed value (so
that the user can use it to replace the call). In the special case of
0 mantissa and 0 exponent ("canonical 0"), a replacement value of 0 is
proposed directly, with no need to trace it.

View File

@@ -1,6 +0,0 @@
.. title:: clang-tidy - hooks-guard-called
hooks-guard-called
==================
Every hook needs to import the guard function `_g` and use it at least once.

View File

@@ -1,15 +0,0 @@
.. title:: clang-tidy - hooks-guard-in-for
hooks-guard-in-for
==================
Consider the following for-loop in C:
.. code-block:: c
#define GUARD(maxiter) _g(__LINE__, (maxiter)+1)
for (int i = 0; GUARD(3), i < 3; ++i)
This is the only way to satisfy the guard rule when using a for-loop
in C.

View File

@@ -1,15 +0,0 @@
.. title:: clang-tidy - hooks-guard-in-while
hooks-guard-in-while
====================
Like for loops, while loops must have a guard in their condition:
.. code-block:: c
#define GUARD(maxiter) _g(__LINE__, (maxiter)+1)
int i = 0;
while (GUARD(3), i < 3)

View File

@@ -1,10 +0,0 @@
.. title:: clang-tidy - hooks-hash-buf-len
hooks-hash-buf-len
==================
Functions `util_sha512h`, `hook_hash`, `ledger_last_hash` and `nonce`
have fixed-size hash output.
This check warns about too-small size of their output buffer (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,11 +0,0 @@
.. title:: clang-tidy - hooks-keylet-buf-len
hooks-keylet-buf-len
====================
Computing a ripple keylet by calling `util_keylet` requires valid
parameters dependent on the keylet type.
This check does not fully parse these parameters, but warns about
invalid keylet type as well as buffer sizes that cannot be valid (if
they're specified by constants - variable parameters are ignored).

View File

@@ -1,11 +0,0 @@
.. title:: clang-tidy - hooks-raddr-conv-buf-len
hooks-raddr-conv-buf-len
========================
Hook API `util_accid` has upper limit on the length of its input
(because it expects it to be a raddr) and fixed-size account ID
output.
This check warns about invalid sizes of input and output parameters
(if they're specified by constants - variable parameters are ignored).

View File

@@ -1,13 +0,0 @@
.. title:: clang-tidy - hooks-raddr-conv-pure
hooks-raddr-conv-pure
=====================
Hooks identify accounts by the 20 byte account ID, which can be
converted from a raddr using the `util_accid` function. If the raddr
never changes, a more efficient way to do this is precompute the
account-id from the raddr.
This check warns about calls of `util_accid` with constant input and
proposes to add a tracing statement showing the computed value (so
that the user can use it to replace the call).

View File

@@ -1,12 +0,0 @@
.. title:: clang-tidy - hooks-reserve-limit
hooks-reserve-limit
===================
Hook API `etxn_reserve` takes a parameter specifying the number of
transactions intended to emit from the calling hook. Value of this
parameter is limited, and the function fails if the limit is exceeded.
This check warns about too-large values of the number of reserved
transactions (if they're specified by a constant - variable parameter
is ignored).

View File

@@ -1,10 +0,0 @@
.. title:: clang-tidy - hooks-slot-hash-buf-len
hooks-slot-hash-buf-len
=======================
Function `slot_id` has fixed-size canonical hash output.
This check warns about too-small size of its output buffer as well as
invalid values of the slot number parameter (if they're specified by
constants - variable parameters are ignored).

View File

@@ -1,10 +0,0 @@
.. title:: clang-tidy - hooks-slot-keylet-buf-len
hooks-slot-keylet-buf-len
=========================
Function `slot_set` has structured keylet input.
This check does not parse the input, but warns about its sizes that
cannot be valid as well as invalid values of the slot number parameter
(if they're specified by constants - variable parameters are ignored).

View File

@@ -1,12 +0,0 @@
.. title:: clang-tidy - hooks-slot-limit
hooks-slot-limit
================
Hook APIs `slot`, `slot_count`, `slot_clear`, `slot_size`,
`slot_float` and `trace_slot` take a parameter specifying the accessed
slot number. Value of this parameter is limited, and the functions
fail if the limit is exceeded.
This check warns about too-large values of the slot number (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,11 +0,0 @@
.. title:: clang-tidy - hooks-slot-sub-limit
hooks-slot-sub-limit
====================
Hook APIs `slot_subarray` and `slot_subfield` take parameters
specifying parent and child slot numbers. Values of these parameters
are limited, and the functions fail if the limit is exceeded.
This check warns about too-large values of the slot numbers (if
they're specified by a constant - variable parameters are ignored).

View File

@@ -1,12 +0,0 @@
.. title:: clang-tidy - hooks-slot-type-limit
hooks-slot-type-limit
=====================
Hook API `slot_type` takes a parameter specifying the accessed slot
number. Value of this parameter is limited, and the function fails if
the limit is exceeded.
This check warns about too-large values of the slot number as well as
invalid values of the flags parameter (if they're specified by
constants - variable parameters are ignored).

View File

@@ -1,9 +0,0 @@
.. title:: clang-tidy - hooks-state-buf-len
hooks-state-buf-len
===================
Functions state and state_set accept fixed-size Hook State key.
This check warns about invalid size of its input buffer (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,9 +0,0 @@
.. title:: clang-tidy - hooks-transaction-hash-buf-len
hooks-transaction-hash-buf-len
==============================
Function `otxn_id` has fixed-size canonical hash output.
This check warns about too-small size of its output buffer (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,11 +0,0 @@
.. title:: clang-tidy - hooks-transaction-slot-limit
hooks-transaction-slot-limit
============================
Function `otxn_slot` takes a parameter specifying the accessed slot
number. Value of this parameter is limited, and the function fails if
the limit is exceeded.
This check warns about too-large values of the slot number (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,10 +0,0 @@
.. title:: clang-tidy - hooks-validate-buf-len
hooks-validate-buf-len
======================
Hook API `sto_validate` requires non-empty input buffer.
This check warns about empty input in calls to `sto_validate` (if it's
specified by a constant - variable parameter is ignored).

View File

@@ -1,12 +0,0 @@
.. title:: clang-tidy - hooks-verify-buf-len
hooks-verify-buf-len
====================
Verifying a cryptographic signature by calling `util_verify` requires
valid public key & data signature.
This check does not fully parse these parameters, but warns about
their sizes that cannot be valid (if they're specified by constants -
variable parameters are ignored).