Repository to store a collection of artifacts and notes for engineers.
This repository uses markdownlint to ensure consistent markdown formatting.
Install dependencies:
npm install
Check markdown files:
npm run lint:md
Auto-fix markdown issues:
npm run lint:md:fix
Markdown linting rules are configured in .markdownlint.json
. The configuration:
- Uses ATX-style headers (# ## ###)
- Sets line length limit to 120 characters
- Allows nested headers with same content
- Permits HTML tags in markdown
- Disables first-line-h1 requirement for flexibility
This document explains how to run the license header check workflow locally without pushing to GitHub.
To run the actual GitHub workflow locally, you can use act
:
# On macOS with Homebrew
brew install act
# Or download from https://github.com/nektos/act
# Run all workflows
act
# Run only the pull_request event workflows
act pull_request
# Run a specific workflow
act -W .github/workflows/license-header-check.yml
# Run with verbose output
act -v -W .github/workflows/license-header-check.yml
# Run the mega-linter workflow
act -W .github/workflows/mega-linter.yml
All source files should include this header in the first 4 lines:
# Copyright The Linux Foundation and each contributor to LFX.
# SPDX-License-Identifier: MIT
For Python files, it can also be in a docstring:
"""
Copyright The Linux Foundation and each contributor to LFX.
SPDX-License-Identifier: MIT
"""
The file patterns defined in the common GitHub Actions license header check workflow are checked.
The excluded file patterns are defined in the common GitHub Actions license header check workflow.
If the check fails:
- Add the required header to the beginning of the file
- Make sure it appears in the first 4 lines
- Use the exact text: "Copyright The Linux Foundation"
- Include the SPDX identifier
Example fix for a Python file:
#!/usr/bin/env python3
# Copyright The Linux Foundation and each contributor to LFX.
# SPDX-License-Identifier: MIT
# rest of your code...