Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/committed.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# https://github.com/crate-ci/committed/blob/master/docs/reference.md
style = "conventional"
subject_capitalized = false
allowed_types = [
"fix",
"feat",
"build",
"chore",
"docs",
"style",
"refactor",
"remove",
"deprecate",
"security",
"add",
"perf",
"test",
]
subject_length = 0 # unlimited
line_length = 0 # unlimited
51 changes: 48 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,62 @@ jobs:
run-pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
id: python-setup
with:
python-version: '3.x'
- name: Run commands
if: inputs.commands
run: ${{ inputs.commands }}
- name: Cache pre-commit environments
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 #v4
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: '~/.cache/pre-commit'
key: pre-commit-${{ steps.python-setup.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
- run: pipx run pre-commit run --show-diff-on-failure --color=always --all-files

check-pr-title:
name: Check PR title
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
# The calling workflow must grant these permissions.
permissions:
contents: read
steps:
- name: Checkout ${{ github.repository }} repo
# needed for cspell.config.yml (project-specific)
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
repository: ${{ github.repository }}
ref: ${{ github.sha }}
path: project-repo
- name: Checkout cpp-linter/.github (org) repo
# needed for committed.toml config (org-specific)
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
repository: cpp-linter/.github
path: org-repo
- run: rustup update --no-self-update
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@2bb61346d075e720d4c3da92f23b6d612d5a7543 # v1.15.3
- name: Install committed
run: cargo binstall -y committed
env:
GITHUB_TOKEN: ${{ github.token }}
- name: conventional-commit
run: >-
echo "${{ github.event.pull_request.title }}"
| committed --config ${{ github.workspace }}/org-repo/.github/committed.toml --commit-file -
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: latest
- name: spell check
working-directory: project-repo
run: >-
echo "${{ github.event.pull_request.title }}"
| npx cspell-cli lint stdin
2 changes: 1 addition & 1 deletion .github/workflows/snyk-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
env:
# In order to use the Snyk Action you will need to have a Snyk API token.
# More details in https://github.com/snyk/actions#getting-your-snyk-token
# or you can signup for free at https://snyk.io/login
# or you can sign up for free at https://snyk.io/login
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: xianpengshen/clang-tools:all
Expand Down
25 changes: 25 additions & 0 deletions cspell.config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: "0.2"
language: en
words:
- Abril
- autobuild
- autolabeler
- binstall
- Fatface
- htmlcov
- mkdocs
- peaceiris
- pipx
- pypi
- rustup
- sarif
- setuptools
- testpypi
- venv
- xianpengshen
ignorePaths:
- .env/**
- .venv/**
- env/**
- venv/**
- .gitignore
3 changes: 2 additions & 1 deletion profile/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- markdownlint-disable MD036 MD041 MD033 -->

<p align="center">
<img src="/assets/readme-banner-small.png" width="512" height="141" alt="cpp-linter_brand_logo" />
</p>
Expand All @@ -6,7 +8,6 @@

## Cpp Linter

<!-- markdownlint-disable MD036 -->
**Automated linting for your C/C++ code**

### Get Started
Expand Down