Skip to main content

    Automated code quality

    Each pull request (PR) on vets-website runs through an automated process that looks for code additions and modifications that don't meet code quality standards. If no issues are found, the code does not need to be reviewed by a VSP engineer. If a potential issue is found, a bot will leave an automated comment and request a manual review from the va-platform-cop-frontend.

    Screen Shot

    Manual reviews

    The following items trigger a manual review:

    • A call to Sentry
    • ESLint being disabled
    • An icon is added with <i ...

    Sentry calls

    VSP reviews logs to Sentry to ensure that any new logs are useful and do not contain personally identifiable information (PII).

    Examples:

    • Do not log an entire request response if all that's important is an error code.
    • Do not log PII such as names, emails, or user IDs.

    ESLint

    VSP enforces ESLint rules through CircleCI to enforce code quality. ESLint rules are included in the .eslintrc file, which is located in the root folder. Any rules that VSP is testing for inclusion are located in the circle.eslint.json file.

    When ESLint rules are disabled, VSP will review each case individually.

    Icons

    VSP uses Font Awesome as a dependency, which uses the <i> tag for adding icons. Sometimes an icon is used as decoration, but other times it is used to convey meaning to the user. VSP reviews the code to ensure that whenever an icon is being used to convey meaning, the meaning is also conveyed to a screen reader.

    Actions to take

    If a manual review is triggered, you can use the error information provided in the comment to identify the problem and resolve any errors. A member of the VSP team will review the PR and confirm that all issues have been resolved or will follow up with more feedback.