CodeGuruReviewer / Client / list_recommendations

list_recommendations#

CodeGuruReviewer.Client.list_recommendations(**kwargs)#

Returns the list of all recommendations for a completed code review.

See also: AWS API Documentation

Request Syntax

response = client.list_recommendations(
    NextToken='string',
    MaxResults=123,
    CodeReviewArn='string'
)
Parameters:
  • NextToken (string) – Pagination token.

  • MaxResults (integer) – The maximum number of results that are returned per call. The default is 100.

  • CodeReviewArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the CodeReview object.

Return type:

dict

Returns:

Response Syntax

{
    'RecommendationSummaries': [
        {
            'FilePath': 'string',
            'RecommendationId': 'string',
            'StartLine': 123,
            'EndLine': 123,
            'Description': 'string',
            'RecommendationCategory': 'AWSBestPractices'|'AWSCloudFormationIssues'|'DuplicateCode'|'CodeMaintenanceIssues'|'ConcurrencyIssues'|'InputValidations'|'PythonBestPractices'|'JavaBestPractices'|'ResourceLeaks'|'SecurityIssues'|'CodeInconsistencies',
            'RuleMetadata': {
                'RuleId': 'string',
                'RuleName': 'string',
                'ShortDescription': 'string',
                'LongDescription': 'string',
                'RuleTags': [
                    'string',
                ]
            },
            'Severity': 'Info'|'Low'|'Medium'|'High'|'Critical'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • RecommendationSummaries (list) –

      List of recommendations for the requested code review.

      • (dict) –

        Information about recommendations.

        • FilePath (string) –

          Name of the file on which a recommendation is provided.

        • RecommendationId (string) –

          The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect the feedback.

        • StartLine (integer) –

          Start line from where the recommendation is applicable in the source commit or source branch.

        • EndLine (integer) –

          Last line where the recommendation is applicable in the source commit or source branch. For a single line comment the start line and end line values are the same.

        • Description (string) –

          A description of the recommendation generated by CodeGuru Reviewer for the lines of code between the start line and the end line.

        • RecommendationCategory (string) –

          The type of a recommendation.

        • RuleMetadata (dict) –

          Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a short and long description. CodeGuru Reviewer uses rules to analyze code. A rule’s recommendation is included in analysis results if code is detected that violates the rule.

          • RuleId (string) –

            The ID of the rule.

          • RuleName (string) –

            The name of the rule.

          • ShortDescription (string) –

            A short description of the rule.

          • LongDescription (string) –

            A long description of the rule.

          • RuleTags (list) –

            Tags that are associated with the rule.

            • (string) –

        • Severity (string) –

          The severity of the issue in the code that generated this recommendation.

    • NextToken (string) –

      Pagination token.

Exceptions

  • CodeGuruReviewer.Client.exceptions.ResourceNotFoundException

  • CodeGuruReviewer.Client.exceptions.InternalServerException

  • CodeGuruReviewer.Client.exceptions.ValidationException

  • CodeGuruReviewer.Client.exceptions.AccessDeniedException

  • CodeGuruReviewer.Client.exceptions.ThrottlingException