io
format_row(tokens, widths, alignment)
¶
Format a row to be displayed in a table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tokens |
List[Any]
|
A list of values to be displayed. |
required |
widths |
List[int]
|
A list of integers of same size as tokens dictating the how many spaces to take for a token. |
required |
alignment |
str
|
Either 'l' or 'r' so that the tokens may be aligned on the left or right. |
required |
Returns:
Type | Description |
---|---|
str
|
A single string for a row of a table. |
Source code in m/ci/celt/core/io.py
project_stats_json(name, project)
¶
Stringify a ProjectStatus
instance.
Displays as json showing the current total of violations for each rule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the compiler/linter. |
required |
project |
ProjectStatus
|
The |
required |
Returns:
Type | Description |
---|---|
str
|
The string version of the project status. |
Source code in m/ci/celt/core/io.py
project_status_str(project, celt_config)
¶
Stringify a ProjectStatus
instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project |
ProjectStatus
|
The |
required |
celt_config |
Configuration
|
The post processor configuration. |
required |
Returns:
Type | Description |
---|---|
str
|
The string version of the project status. |
Source code in m/ci/celt/core/io.py
rule_info_str(rule, config)
¶
Format a single rule and its violations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rule |
RuleInfo
|
The rule to display. |
required |
config |
Configuration
|
The post processor configuration. |
required |
Returns:
Type | Description |
---|---|
str
|
A string representation of the rule info. |