CodeQL documentation

Poorly documented large function

ID: cpp/poorly-documented-function
Kind: problem
Security severity: 
Severity: warning
Precision: medium
Tags:
   - maintainability
   - documentation
   - statistical
   - non-attributable
Query suites:
   - cpp-security-and-quality.qls

Click to see the query in the CodeQL repository

This rule finds large functions that have too few comment lines. Documentation becomes more important as a function becomes more complex, and a lack of documentation makes it harder to maintain.

Recommendation

Add comments to document the purpose of the function. Large, complex functions in particular require detailed documentation, not only because they are harder to understand, but the process of documentation may reveal that the function could be split into smaller, more cohesive functions.

References

  • © GitHub, Inc.
  • Terms
  • Privacy
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy