PricingDownload
Product

Platform

All features48 capabilities, from IDE to CICompliance KitsISO 26262, DO-178C, IEC 62304...AI GovernanceControl AI-generated C/C++ codeWhat’s new in 2027Latest version highlightsScreenshotsSee the product in action

Analyze & improve

Coding standardsMISRA, CERT, CWE, AUTOSARArchitecture & dependenciesGraphs, matrix, cyclesSBOM & dependenciesIs our C++ code affected? Minutes, not weeksTechnical debtMeasured in hours and dollarsQuality gatesStop regressions in CISmart Code CityYour codebase in 3D

Integrations

IDE pluginsVisual Studio, VS Code, CLion...CI/CD pipelinesJenkins, Azure DevOps, GitHub, GitLabSonarQube pluginC/C++ results in SonarQubeExternal analyzersClang-Tidy, Cppcheck, coverageFeature on Demand
Solutions

By need

Functional safetyCompliance kits per standardCoding standardsMISRA, CERT, AUTOSAR, ISO...Legacy modernizationRefactor large C/C++ safelyCode auditExpert review of your codebaseM&A due diligenceAssess technical health fast

By role

DevelopersSoftware architectsTech leadsDevOps engineersEngineering managersProject managers

CTOsCIOs / IT leadersQA engineersSecurity leadersComplianceConsultantsRequest a guided PoC
Industries

Safety-critical

AutomotiveISO 26262, MISRA, AUTOSARAerospace & DefenseDO-178C programsMedical DevicesIEC 62304 softwareEnergy & UtilitiesIEC 61508 systemsEmbedded SystemsFirmware and devices

Enterprise

Financial ServicesTrading and paymentsGame DevelopmentEngines and large C++Software VendorsCommercial C/C++ productsGovernmentAgencies and contractorsAll industries & case studies
Resources

Learn

DocumentationGuides, rules and CI setupKnowledge baseFrequently asked questionsBlogC and C++ code quality articlesRelease notesEvery version since 2009

Customers

Case studiesSuccess storiesTestimonialsWhat users sayOur customersCompanies using CppDependGold Code QualityOpen source projects we rate

Programs & company

Feature on DemandMissing features built for freeFree for open sourceLicenses for OSS and studentsContact usSales and supportEULALicense agreement
Docs
Documentation

Design and Architecture

Licensing checks

Licence and copyright headers of every file, checked against your policy and the licence of your project.

6 min readDesign and ArchitectureCppDepend 2027

Overview

Licensing Insights reads the licence and copyright header of every source file and checks it against your policy. It answers: which licences are in my code, are they allowed, are they compatible with the licence of my project, and which third-party files carry no licence information at all.

It recognises licences from the SPDX-License-Identifier tag and, when there is no tag, from the text of the header (MIT, Apache, BSD, GPL, LGPL, AGPL, MPL, ISC, Zlib, Boost and others). Deprecated identifiers (GPL-2.0, LGPL-2.1+) are flagged.

Quick start

  1. Open Settings > Licensing Policy.
  2. Enter the licence of your project (an SPDX id such as Apache-2.0). Compatibility cannot be checked without it.
  3. Optionally fill the allowed and denied lists, and the required header text.
  4. Run the analysis and open Licensing Insights > Licensing Overview.

How files are classified

The scanner does not guess from folder names. It uses what CppDepend already knows after parsing the project:

ClassWhere it comes from
Your filesThe source files and header files of your projects (ProjectSourceFiles, HeaderFiles).
Third-party filesFramework projects, headers the parser excluded, included files marked as excluded, and the headers of external projects found in the include paths (system and library headers).
Generated filesRecognised by their marker (for example "generated", "do not edit"); skipped when Skip generated files is on.

You can add folders that must always count as third-party in Extra third-party folders, and folders to leave out entirely in Excluded folders.

Settings

Page Settings > Licensing Policy. Saved in the project file, element LicensingSettings. Setting CPPDEPEND_LICENSING=0 in the environment switches the check off (useful in CI).

SettingDefaultEffect
EnabledOnRuns the check with the analysis.
Project licenceemptySPDX id of your project: used for compatibility and mismatch.
Require a licence headerOnOwn files without a licence header give LIC-MISSING-01.
Require a copyright noticeOffGives LIC-COPYRIGHT-01 when a header has no copyright line.
Require an SPDX tagOffGives LIC-SPDX-01 when there is no machine-readable tag.
Required header textemptyText that every header must contain (LIC-TEXT-01).
Allowed licences / Denied licencesemptyAllowed: anything else is refused. Denied: these are refused. Both give LIC-DENIED-01.
Skip generated filesOnGenerated code is not required to carry a header.
Scan third-party filesOnReads the third-party files too.
Third-party limit5000Maximum number of third-party files read (see Performance).
Extra third-party folders / Excluded foldersemptyFolders to treat as third-party, or to ignore.

Policy examples

Proprietary product. Project licence LicenseRef-Proprietary, denied GPL-2.0-only, GPL-3.0-only, AGPL-3.0-only. Any GPL header in your files or in third-party headers is a LIC-DENIED-01 or LIC-INCOMPAT-01.
Open-source library. Project licence Apache-2.0, require SPDX tag on. Files copied from a GPL project give an incompatibility; files under MIT or BSD pass.
Strict corporate header. Required header text = the first line of your standard notice. Every file without it gives LIC-TEXT-01.

Rules and how to fix

RuleSeverityWhat it meansHow to fix
LIC-MISSING-01LowFile without licence header
Without a licence and a copyright notice at the top, nobody can tell under which terms the file may be used, copied or sold.
Add the standard header of your project at the top of the file, ideally with a one-line tag: // SPDX-License-Identifier: <id> and // Copyright (c) <year> <holder>. A script or a formatter hook can add it to all files at once.
LIC-THIRDPARTY-01MediumThird-party file without licence information
Code copied from elsewhere without its licence is a legal risk: you cannot show that you may use it.
Find where the code comes from and keep its original licence header. If you cannot, replace the code, or add a LICENSE file in its folder and ask legal to confirm the terms.
LIC-UNKNOWN-01MediumLicence not recognised
The header speaks of a licence, but it is not one the scanner knows, so the policy and the compatibility cannot be checked.
Use a standard SPDX identifier (SPDX-License-Identifier: <id>). For a custom licence use LicenseRef-<name> and add its text in LICENSES/.
LIC-DENIED-01HighLicence not allowed by the policy
The licence of this file is on the denied list, or is not on the allowed list of Settings > Licensing Insights.
Replace or remove the file, get another licence from its author, or, if the policy is too strict, update it in the settings after legal approval.
LIC-INCOMPAT-01HighLicence incompatible with the project licence
The terms of this file cannot be combined with the licence of your project (for example GPL code in a proprietary or permissive project).
Remove the code or find an alternative with a compatible licence, ask the author for a different licence, or change the licence of the project. Ask legal before shipping.
LIC-COPYLEFT-01MediumCopyleft licence to review
Copyleft licences ask you to publish the source of the combined or modified work under the same terms. Strong copyleft (GPL) and network copyleft (AGPL) reach the whole product.
Check how the file is used (linking, distribution, network service). Set the project licence in the settings so that the check can say if it is compatible, or replace the code.
LIC-MISMATCH-01LowLicence differs from the project licence
The file uses another licence than the project. It can be fine (copied code), but it must be intentional and listed.
Check that the licence is compatible and keep the original header. If the file is yours, use the licence of the project.
LIC-PROPRIETARY-01MediumProprietary notice in an open or third-party file
The header says 'all rights reserved' or confidential without granting any licence, which conflicts with the licence of the project or the use of third-party code.
Replace the notice by the real licence of the file, or move the file out of the open-source or third-party part.
LIC-COPYRIGHT-01LowNo copyright notice
A licence without a copyright notice does not say who grants it.
Add // Copyright (c) <year> <holder> next to the licence line.
LIC-SPDX-01LowNo SPDX identifier
A machine-readable SPDX tag lets tools (and this page) read the licence without guessing from the text.
Add // SPDX-License-Identifier: <id> as the first line of the header.
LIC-TEXT-01MediumRequired header text missing
The header does not contain the text that the project requires in every file (see Settings > Licensing Insights).
Add the standard header text of your company at the top of the file.
LIC-DEPRECATED-01LowDeprecated SPDX identifier
Identifiers such as GPL-2.0 or LGPL-2.1+ are deprecated: they do not say 'only' or 'or later' clearly.
Use the -only or -or-later form (GPL-2.0-only, GPL-2.0-or-later) that matches the real intent of the file.

Where to see results

  • Licensing Insights > Licensing Overview: licence inventory (how many files per licence), folders, third-party files, findings with the fix of each rule.
  • Issues: tool Licensing, one issue per finding with file and line.
  • File on disk: licensing.json in the analysis output folder (inventory, folders, findings, how to fix).

Performance on large projects

Only the top of each file is read, never the whole file. Your own files are always read. Third-party files can be numerous (system headers), so they are read in parallel and limited by Third-party limit; the log says how many third-party files were known and how many were read. Switch Scan third-party files off to skip them completely.

Limits

  • The check reads headers, not the real origin of the code: code pasted without its header is invisible.
  • Licence recognition from free text is a best effort; unknown wording gives LIC-UNKNOWN-01 for review.
  • Compatibility is based on common licence families and is not legal advice. Ask your legal team for the final decision.

Questions

Why are system headers listed?

They are third-party files known from the include paths. Reduce them with Third-party limit or switch the scan off.

Why no compatibility findings?

The project licence is empty. Enter it in the policy page.

Was this page helpful?
Evaluating CppDepend on a production codebase?Get a guided proof of concept with our static analysis architects.
Request a PoC