1
File-Header-Standards
Jonathan Miller edited this page 2026-06-06 22:59:24 +00:00
File Header Standards
Defines the required and optional elements for source file comment headers across all MokoStandards-governed repositories.
Required: Copyright + SPDX
Every source file (PHP, JS, CSS, Shell, YAML) must contain a copyright notice and SPDX license identifier within the first 20 lines.
PHP
/* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
*
* This file is part of a Moko Consulting project.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
CSS / JavaScript
@charset "UTF-8";
/* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
This file is part of a Moko Consulting project.
SPDX-License-Identifier: GPL-3.0-or-later
*/
YAML (workflows)
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
Markdown / HTML
<!-- Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
This file is part of a Moko Consulting project.
SPDX-License-Identifier: GPL-3.0-or-later
-->
Optional: FILE INFORMATION Block
The FILE INFORMATION block provides metadata for tooling (bulk sync, validation, documentation generators). It is optional but recommended for key files.
Fields
| Field | Required | Description |
|---|---|---|
| DEFGROUP | No | Logical group (e.g. Joomla.Template.Site) |
| INGROUP | No | Parent group (e.g. MokoOnyx) |
| REPO | No | Repository URL |
| PATH | No | File path relative to repo root |
| BRIEF | No | One-line description of the file |
Example (PHP)
/* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
*
* This file is part of a Moko Consulting project.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* FILE INFORMATION
* DEFGROUP: MokoOnyx.Layout
* INGROUP: MokoOnyx
* PATH: /src/html/layouts/joomla/module/card.php
* BRIEF: Card-style module chrome layout
*/
Example (YAML)
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: MokoStandards.Joomla
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
# PATH: /templates/workflows/joomla/auto-release.yml.template
# BRIEF: Joomla build and release pipeline
Removed Fields
| Field | Status | Reason |
|---|---|---|
| VERSION | Removed | Version is tracked in README.md and manifest files (templateDetails.xml, composer.json, etc.), not in individual file headers. Maintaining version numbers in every file header caused drift and unnecessary churn on bulk updates. |
Validation
The check_license_headers.php validator checks for the presence of SPDX-License-Identifier: in the first 20 lines of tracked PHP, JS, CSS, and Shell files. This is an advisory check (always exits 0).
php validate/check_license_headers.php --path /a/MokoOnyx
Related
- Documentation-Standards -- repo health and required files
- WORKFLOW_STANDARDS -- CI/CD workflow conventions
Repo: moko-platform · moko-platform wiki
| Field | Value |
|---|---|
| Minimum Version | 04.07.00 |
| Platform | all |
| Applies To | All repositories |
| Revision | Date | Author | Description |
|---|---|---|---|
| 1.0 | 2026-05-11 | Moko Consulting | Initial version |
Pages
- Home
-
api
- api-automation-index
- api-definitions-default-index
- api-definitions-sync-index
- api-deploy-index
- api-fix-index
- api-index
- api-maintenance-index.-
- api-maintenance-index
- api-plugin-index.-
- api-plugin-index
- api-tests-index.-
- api-tests-sample-index.-
- api-tests-sample-index
- api-validate-index.-
- maintenance-index
- automation
- features
- guides
- operations
- reference
- standards
- templates
-
workflows
- workflows-README.-
- workflows-README
- workflows-auto-release.-
- workflows-auto-release
- workflows-branch-protection.-
- workflows-branch-protection
- workflows-build-release.-
- workflows-build-release
- workflows-cascade-dev.-
- workflows-cascade-dev
- workflows-changelog-management.-
- workflows-changelog-management
- workflows-demo-deployment.-
- workflows-demo-deployment
- workflows-dev-branch-tracking.-
- workflows-dev-branch-tracking
- workflows-dev-deployment.-
- workflows-dev-deployment
- workflows-index.-
- workflows-index
- workflows-release-system.-
- workflows-release-system
- workflows-renovate.-
- workflows-renovate
- workflows-reusable-workflows.-
- workflows-reusable-workflows
- workflows-rs-deployment.-
- workflows-rs-deployment
- workflows-secret-scanning.-
- workflows-secret-scanning
- workflows-shared-workflows.-
- workflows-shared-workflows
- workflows-standards-compliance.-
- workflows-standards-compliance
- workflows-static-analysis.-
- workflows-static-analysis
- workflows-sub-issue-management.-
- workflows-sub-issue-management
- workflows-update-server.-
- workflows-update-server
- workflows-workflow-architecture.-
- workflows-workflow-architecture