Skip to content

checks

Define check classes.

GatorGraderCheck

Represent a GatorGrader check.

Source code in gatorgrade/input/checks.py
23
24
25
26
27
28
29
30
31
32
33
34
class GatorGraderCheck:  # pylint: disable=too-few-public-methods
    """Represent a GatorGrader check."""

    def __init__(self, gg_args: List[str], json_info):
        """Construct a GatorGraderCheck.

        Args:
            gg_args: The list of arguments to pass to GatorGrader.
            json_info: The all-encompassing check information to include in json output.
        """
        self.gg_args = gg_args
        self.json_info = json_info

__init__(gg_args, json_info)

Construct a GatorGraderCheck.

Parameters:

Name Type Description Default
gg_args List[str]

The list of arguments to pass to GatorGrader.

required
json_info

The all-encompassing check information to include in json output.

required
Source code in gatorgrade/input/checks.py
26
27
28
29
30
31
32
33
34
def __init__(self, gg_args: List[str], json_info):
    """Construct a GatorGraderCheck.

    Args:
        gg_args: The list of arguments to pass to GatorGrader.
        json_info: The all-encompassing check information to include in json output.
    """
    self.gg_args = gg_args
    self.json_info = json_info

ShellCheck

Represent a shell check.

Source code in gatorgrade/input/checks.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
class ShellCheck:  # pylint: disable=too-few-public-methods
    """Represent a shell check."""

    def __init__(self, command: str, description: str = None, json_info=None):
        """Construct a ShellCheck.

        Args:
            command: The command to run in a shell.
            description: The description to use in output.
                If no description is given, the command is used as the description.
            json_info: The all-encompassing check information to include in json output.
                If none is given, command is used
        """
        self.command = command
        self.description = description if description is not None else command
        self.json_info = json_info

__init__(command, description=None, json_info=None)

Construct a ShellCheck.

Parameters:

Name Type Description Default
command str

The command to run in a shell.

required
description str

The description to use in output. If no description is given, the command is used as the description.

None
json_info

The all-encompassing check information to include in json output. If none is given, command is used

None
Source code in gatorgrade/input/checks.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
def __init__(self, command: str, description: str = None, json_info=None):
    """Construct a ShellCheck.

    Args:
        command: The command to run in a shell.
        description: The description to use in output.
            If no description is given, the command is used as the description.
        json_info: The all-encompassing check information to include in json output.
            If none is given, command is used
    """
    self.command = command
    self.description = description if description is not None else command
    self.json_info = json_info