CS 3 (Spring 2024) Code Quality Guidelines

The following is a list of code quality patters that we will check for. Each item includes the week in which you will start being graded on them.

Formatting

formatting::brace-styles [activated week 4]

formatting::indendentation [activated week 4]

formatting::line-length [activated week 4]

formatting::one-liners [activated week 2]

formatting::spacing [activated week 2]

Variables

variables::casting-malloc [activated week 3]

variables::constant-scope [activated week 3]

variables::declaration-location [activated week 2]

variables::description [activated week 2]

variables::global-variables [activated week 3]

variables::magic-constants [activated week 2]

variables::snake-case [activated week 2]

variables::type [activated week 2]

Macros

macros::defines [activated week 3]

macros::misuse [activated week 3]

Functions and Decomposition

functions::code-duplication-multiple-functions [activated week 2]

functions::code-duplication-single-function [activated week 2]

functions::description [activated week 2]

functions::error-handling [activated week 2]

functions::expensive-function-calls [activated week 2]

functions::over-modularization [activated week 3]

functions::snake-case [activated week 2]

Modules and Types

types::header-file [activated week 2]

types::include-guards [activated week 2]

types::snake-case [activated week 2]

Commenting

commenting::description [activated week 2]

Compilation/Functionality

compilation::errors [activated week 2]

compilation::tests [activated week 2]

compilation::warnings [activated week 2]

Design

design::booleans [activated week 4]

design::dead-code [activated week 2]

design::debug-statements [activated week 2]

design::encapsulation [activated week 2]

design::extra-control-flow [activated week 2]

design::includes [activated week 2]

design::loop-choice [activated week 2]

design::single-owner [activated week 2]

Acknowledgements

Thanks to Stanford and CMU as sources for similar style guidlines.