Skip to content

Commit

Permalink
Remove prefixes from parameter documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zachcran committed May 22, 2023
1 parent e07bfe2 commit 8942935
Show file tree
Hide file tree
Showing 20 changed files with 122 additions and 122 deletions.
4 changes: 2 additions & 2 deletions cmake_test/add_dir.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ include_guard()
# with CTest. The configured templates will be executed seperately via CTest during the Test phase, and each *.cmake
# file found in the specified directory is assumed to contain CMakeTest tests.
#
# :param _ad_dir: The directory to search for *.cmake files. Subdirectories will be recursively searched.
# :type _ad_dir: path
# :param dir: The directory to search for *.cmake files. Subdirectories will be recursively searched.
# :type dir: path
#
# **Keyword Arguments**
#
Expand Down
8 changes: 4 additions & 4 deletions cmake_test/asserts/defined.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ include_guard()
# assert that the variable is set to any particular value. If the variable is
# not defined it will raise an error.
#
# :param _ad_var: The identifier to check for defined-ness.
# :type _ad_var: Identifier
# :param var: The identifier to check for defined-ness.
# :type var: Identifier
#]]
function(ct_assert_defined _ad_var)
if(NOT DEFINED ${_ad_var})
Expand All @@ -34,8 +34,8 @@ endfunction()
# This function can be used to assert that a variable is not defined. If the
# variable is actually defined this function will raise an error.
#
# :param _and_var: The identifier to check for defined-ness.
# :type _and_var: Identifier
# :param var: The identifier to check for defined-ness.
# :type var: Identifier
#]]
function(ct_assert_not_defined _and_var)
if(DEFINED ${_and_var})
Expand Down
16 changes: 8 additions & 8 deletions cmake_test/asserts/equal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ include_guard()
# specific contents. If the identifier is not set to the specified contents a
# fatal error will be raised.
#
# :param _ae_var: The identifier whose contents are in question.
# :type _ae_var: Identifier
# :param _ae_contents: What the identifier should be set to.
# :type _ae_contents: String
# :param var: The identifier whose contents are in question.
# :type var: Identifier
# :param contents: What the identifier should be set to.
# :type contents: String
#]]
function(ct_assert_equal _ae_var _ae_contents)
if(NOT "${${_ae_var}}" STREQUAL "${_ae_contents}")
Expand All @@ -41,10 +41,10 @@ endfunction()
# other than the specified contents. If the identifier is set to the specified
# contents a fatal error will be raised.
#
# :param _ane_var: The identifier whose contents are in question.
# :type _ane_var: Identifier
# :param _ane_contents: What the identifier should not be set to.
# :type _ane_contents: String
# :param var: The identifier whose contents are in question.
# :type var: Identifier
# :param contents: What the identifier should not be set to.
# :type contents: String
#]]
function(ct_assert_not_equal _ane_var _ane_contents)
if("${${_ane_var}}" STREQUAL "${_ane_contents}")
Expand Down
30 changes: 15 additions & 15 deletions cmake_test/asserts/file_contains.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ include(cmake_test/asserts/file_exists)
# Asserts that the file at the specified path contains the specified text.
# Will return if the file does not exist, the assertion failure will be logged as a fatal error.
#
# :param _afc_file: The file to check
# :type _afc_file: path
# :param _afc_text: The text to check for
# :type _afc_text: string
# :param file: The file to check
# :type file: path
# :param text: The text to check for
# :type text: string
#]]
function(ct_assert_file_contains _afc_file _afc_text)
# Ensure the file exists
Expand All @@ -48,10 +48,10 @@ endfunction()
#
# Will return if the file does not exist, the assertion failure will be logged as a fatal error.
#
# :param _afdnc_file: The file to check
# :type _afdnc_file: path
# :param _afdnc_text: The text to check for
# :type _afdnc_text: string
# :param file: The file to check
# :type file: path
# :param text: The text to check for
# :type text: string
#]]
function(ct_assert_file_does_not_contain _afdnc_file _afdnc_text)
# Ensure the file exists
Expand All @@ -77,13 +77,13 @@ endfunction()
#
# Will return if the file does not exist, the assertion failure will be logged as a fatal error.
#
# :param _fc_result: Name to use for the variable which will hold the result.
# :type _fc_result: bool
# :param _fc_file: The file to check.
# :type _fc_file: string
# :param _fc_text: The text to check for.
# :type _fc_text: string
# :returns: ``_fc_result`` will be set to ``TRUE`` if file contains the text
# :param result: Name to use for the variable which will hold the result.
# :type result: bool
# :param file: The file to check.
# :type file: string
# :param text: The text to check for.
# :type text: string
# :returns: ``result`` will be set to ``TRUE`` if file contains the text
# and ``FALSE`` if it does not.
# :rtype: bool
#]]
Expand Down
8 changes: 4 additions & 4 deletions cmake_test/asserts/file_exists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ include_guard()

#[[[ Assert that the file at the provided path exists.
#
# :param _afe_path: The path to check
# :type _afe_path: Path
# :param path: The path to check
# :type path: Path
#]]
function(ct_assert_file_exists _afe_path)
if(NOT EXISTS "${_afe_path}")
Expand All @@ -29,8 +29,8 @@ endfunction()

#[[[ Assert that a file does not exist at the provided path.
#
# :param _afdne_path: The path to check
# :type _afdne_path: Path
# :param path: The path to check
# :type path: Path
#]]
function(ct_assert_file_does_not_exist _afdne_path)
if(EXISTS "${_afdne_path}" AND NOT IS_DIRECTORY "${_afdne_path}")
Expand Down
18 changes: 9 additions & 9 deletions cmake_test/asserts/library_exists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ include_guard()
#
# Asserts that the target exists and is a library.
#
# :param _ale_name: The name of the library
# :type _afe_path: string
# :param name: The name of the library
# :type path: string
#]]
function(ct_assert_library_target_exists _ale_name)
# Check that the target exists and it is a library
Expand All @@ -35,8 +35,8 @@ endfunction()
#
# Asserts that the target does not exist or is not a library.
#
# :param _aldne_name: The name of the library
# :type _aldne_name: string
# :param name: The name of the library
# :type name: string
#]]
function(ct_assert_library_does_not_exist _aldne_name)
# Check that the target does not exist or is not a library
Expand All @@ -52,11 +52,11 @@ endfunction()
# target is of type ``STATIC_LIBRARY``, ``MODULE_LIBRARY``, or
# ``SHARED_LIBRARY`` and then returns an integer indicating what it found.
#
# :param _lte_result: Name to use for the variable which will hold the result.
# :type _lte_result: int
# :param _lte_name: The target name to check.
# :type _lte_name: string
# :returns: ``_lte_result`` will be set to ``0`` if the target is a library,
# :param result: Name to use for the variable which will hold the result.
# :type result: int
# :param name: The target name to check.
# :type name: string
# :returns: ``result`` will be set to ``0`` if the target is a library,
``1`` if the target is not a library, and ``2`` if target does not
exist.
# :rtype: int
Expand Down
8 changes: 4 additions & 4 deletions cmake_test/asserts/list.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ include_guard()
# function will not consider such strings lists. If the identifier is not a list
# an error will be raised.
#
# :param _anl_var: The identifier we want to know the list-ness of.
# :type _anl_var: Identifier
# :param var: The identifier we want to know the list-ness of.
# :type var: Identifier
#]]
function(ct_assert_list _al_var)
list(LENGTH ${_al_var} _al_length)
Expand All @@ -40,8 +40,8 @@ endfunction()
# function will not consider such strings lists. If the provided string is a
# list this function will raise an error.
#
# :param _anl_var: The identifier we want to know the list-ness of.
# :type _anl_var: Identifier
# :param var: The identifier we want to know the list-ness of.
# :type var: Identifier
#]]
function(ct_assert_not_list _anl_var)
list(LENGTH ${_anl_var} _anl_length)
Expand Down
4 changes: 2 additions & 2 deletions cmake_test/asserts/prints.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ include_guard()
# If the previously printed message does not exactly match the expected message,
# this function will treat the expected message as a regex to check if it matches.
#
# :param _ap_msg: The message expected to have been printed, either exact match or regex.
# :type _ap_msg: String
# :param msg: The message expected to have been printed, either exact match or regex.
# :type msg: String
#]]
function(ct_assert_prints _ap_msg)
cpp_get_global(_ap_last_msg CT_LAST_MESSAGE)
Expand Down
8 changes: 4 additions & 4 deletions cmake_test/asserts/string.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ include_guard()
# raise an error if the provided identifier is not a string. Consequentially,
# this function is more-or-less equivalent to ct_assert_not_list.
#
# :param _as_var: The identifier we want the stringy-ness of.
# :type _as_var: Identifier
# :param var: The identifier we want the stringy-ness of.
# :type var: Identifier
#]]
function(ct_assert_string _as_var)
list(LENGTH ${_as_var} _as_length)
Expand All @@ -38,8 +38,8 @@ endfunction()
# raise an error if the provided identifier is a string. Consequentially, this
# function is more-or-less equivalent to ct_assert_list.
#
# :param _ans_var: The identifier we want the stringy-ness of.
# :type _ans_var: Identifier
# :param var: The identifier we want the stringy-ness of.
# :type var: Identifier
#]]
function(ct_assert_not_string _ans_var)
list(LENGTH ${_ans_var} _ans_length)
Expand Down
8 changes: 4 additions & 4 deletions cmake_test/asserts/target_exists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ include_guard()

#[[[ Assert that a target exists.
#
# :param _ate_name: The name of the target
# :type _ate_name: String
# :param name: The name of the target
# :type name: String
#]]
function(ct_assert_target_exists _ate_name)
# Check if the target exists, if not throw an error
Expand All @@ -28,8 +28,8 @@ endfunction()

#[[[ Assert that a target does not exist.
#
# :param _ate_name: The name of the target
# :type _ate_name: String
# :param name: The name of the target
# :type name: String
#]]
function(ct_assert_target_does_not_exist _atdne_name)
# Check if the target exists, if it does, throw an error
Expand Down
16 changes: 8 additions & 8 deletions cmake_test/asserts/target_has_property.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ include(cmake_test/asserts/target_exists)

#[[[ Assert that a target has a property.
#
# :param _athp_target: The name of the target
# :type _athp_target: String
# :param _athp_property: The name of the property
# :type _athp_property: String
# :param target: The name of the target
# :type target: String
# :param property: The name of the property
# :type property: String
#]]
function(ct_assert_target_has_property _athp_target _athp_property)
# Ensure the target exists
Expand All @@ -39,10 +39,10 @@ endfunction()

#[[[ Assert that a target does not have a property.
#
# :param _atdnhp_target: The name of the target
# :type _atdnhp_target: String
# :param _atdnhp_property: The name of the property
# :type _atdnhp_property: String
# :param target: The name of the target
# :type target: String
# :param property: The name of the property
# :type property: String
#]]
function(ct_assert_target_does_not_have_property _atdnhp_target _atdnhp_property)
# Ensure the target exists
Expand Down
8 changes: 4 additions & 4 deletions cmake_test/asserts/true_false.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ include_guard()

#[[[ Asserts that the provided variable is true.
#
# :param _at_var: The identifier to check for trueness.
# :type _at_var: Identifier
# :param var: The identifier to check for trueness.
# :type var: Identifier
#]]
function(ct_assert_true _at_var)
if(NOT ${_at_var})
Expand All @@ -27,8 +27,8 @@ endfunction()

#[[[ Asserts that the provided variable is false.
#
# :param _af_var: The identifier to check for falseness.
# :type _af_var: Identifier
# :param var: The identifier to check for falseness.
# :type var: Identifier
#]]
function(ct_assert_false _af_var)
if(${_af_var})
Expand Down
8 changes: 4 additions & 4 deletions cmake_test/detail_/utilities/input_check.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ include(cmake_test/asserts/list)
# the event that the input to this function is not an identifier, or if that
# identifier is not set to a value, this function will raise a fatal error.
#
# :param _n_var: The identifier to check for defined-ness.
# :type _n_var: Identifier
# :param var: The identifier to check for defined-ness.
# :type var: Identifier
#]]
function(_ct_nonempty _n_var)
cmake_policy(SET CMP0054 NEW)
Expand All @@ -39,8 +39,8 @@ endfunction()
# or if the identifier is set to an empty string this function will raise a
# fatal error.
#
# :param _ns_var: The identifier whose contents is being examined.
# :type _ns_var: Identifier
# :param var: The identifier whose contents is being examined.
# :type var: Identifier
#]]
function(_ct_nonempty_string _ns_var)
_ct_nonempty("${_ns_var}")
Expand Down
14 changes: 7 additions & 7 deletions cmake_test/detail_/utilities/lc_find.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ include_guard()
# provided as ``${_lf_found}`` will be set to ``TRUE`` otherwise it will be set
# to ``FALSE``.
#
# :param _lf_found: Identifier to hold the result.
# :type _lf_found: Identifier
# :param _lf_substring: The substring we are looking for.
# :type _lf_substring: str
# :param _lf_string: The string we are searching for ``${_lf_substring}`` in.
# :type _lf_string: str
# :param found: Identifier to hold the result.
# :type found: Identifier
# :param substring: The substring we are looking for.
# :type substring: str
# :param string: The string we are searching for ``${_lf_substring}`` in.
# :type string: str
# :returns: ``TRUE`` if the substring is found and ``FALSE`` otherwise. Result
# is accessible to the caller via ``_lf_found``.
# is accessible to the caller via ``found``.
#]]
function(_ct_lc_find _lf_found _lf_substring _lf_string)
string(TOLOWER "${_lf_string}" _lf_lc_string)
Expand Down
Loading

0 comments on commit 8942935

Please sign in to comment.