Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
xeco23
CleanCode
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Home
Jump to bottom
Enes Hecan edited this page
Dec 30, 2017
·
4 revisions
Welcome to the CleanCode wiki!
Requirements
For only C++ language now.
Basic
Readability
Uninitialized variables
Unused variables
Suggest indentation if doesn't exist
Suggest that braces should exist in a line on their own to indicate them as a sign of scope
Alignment of similar data types
Analyze length of methods
Check namings
const keyword usage
Encourage less commenting by suggesting using explanatory names
Suggest
auto
keyword where data type is very long
Suggest typedef for often used data types consist of multiple types
Prevent Bugs
Avoid unsigned data types
Prefer sizeof(varname) to sizeof(type)
Destroy objects in orderly in the destructor
Avoid using namespace directive
Define a guard or pragma at the beginning of every header
Performance
make_shared
instead of
reset
where it is usable
nullptr
instead of
NULL
Suggest const type X = val instead of #define X val
Advanced
Convention consistency
Wiki pages
Pages
1
Loading
Home
Requirements
Basic
Readability
Prevent Bugs
Performance
Advanced
Clone this wiki locally
You can’t perform that action at this time.