Skip to content

Commit b10c522

Browse files
committed
feat: update README.md and add requires-python
1 parent a58cd8b commit b10c522

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

Diff for: .github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
coverage report
3535
coverage xml
3636
- uses: codecov/codecov-action@v5
37+
if: matrix.python-version == '3.13'
3738
with:
3839
token: ${{ secrets.CODECOV_TOKEN }}
3940
files: ./coverage.xml

Diff for: README.md

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# cpp-linter-hooks
22

3-
[![PyPI](https://img.shields.io/pypi/v/cpp-linter-hooks)](https://pypi.org/project/cpp-linter-hooks/)
3+
[![PyPI](https://img.shields.io/pypi/v/cpp-linter-hooks?color=blue)](https://pypi.org/project/cpp-linter-hooks/)
4+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cpp-linter-hooks)](https://pypi.org/project/cpp-linter-hooks/)
45
[![codecov](https://codecov.io/gh/cpp-linter/cpp-linter-hooks/branch/main/graph/badge.svg?token=L74Z3HZ4Y5)](https://codecov.io/gh/cpp-linter/cpp-linter-hooks)
56
[![Test](https://github.com/cpp-linter/cpp-linter-hooks/actions/workflows/test.yml/badge.svg)](https://github.com/cpp-linter/cpp-linter-hooks/actions/workflows/test.yml)
67
[![CodeQL](https://github.com/cpp-linter/cpp-linter-hooks/actions/workflows/codeql.yml/badge.svg)](https://github.com/cpp-linter/cpp-linter-hooks/actions/workflows/codeql.yml)
78
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
89
<!-- [![PyPI - Downloads](https://img.shields.io/pypi/dw/cpp-linter-hooks)](https://pypi.org/project/cpp-linter-hooks/) -->
910

10-
cpp-linter-hooks is a [pre-commit](https://pre-commit.com/) hook that uses clang-format and clang-tidy to check your C/C++ code.
11+
cpp-linter-hooks is a [pre-commit](https://pre-commit.com/) hook that uses `clang-format` and `clang-tidy` to format C/C++ code.
1112

1213
> [!NOTE]
13-
> This hook automatically downloads a specific version of `clang-format` or `clang-tidy` [binaries](https://github.com/cpp-linter/clang-tools-static-binaries) and installs it on the system.
14+
> This hook automatically downloads specific versions of `clang-format` or `clang-tidy` [binaries](https://github.com/cpp-linter/clang-tools-static-binaries) and installs them on your system.
1415
1516
## Usage
1617

17-
Add the following configuration to your `.pre-commit-config.yaml`:
18+
To use cpp-linter-hooks, add the following configuration to your `.pre-commit-config.yaml`:
19+
20+
### Basic Configuration
1821

1922
```yaml
2023
repos:
@@ -27,6 +30,8 @@ repos:
2730
args: [--checks='boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*']
2831
```
2932
33+
### Custom Configuration
34+
3035
To use custom configurations like `.clang-format` and `.clang-tidy`:
3136

3237
```yaml
@@ -55,15 +60,15 @@ repos:
5560

5661
## Output
5762

58-
### clang-format output
63+
### clang-format Example
5964

6065
```bash
6166
clang-format.............................................................Failed
6267
- hook id: clang-format
6368
- files were modified by this hook
6469
```
6570

66-
The diff between the modified file is as follows:
71+
Here’s a sample diff showing the formatting applied:
6772

6873
```diff
6974
--- a/testing/main.c
@@ -106,7 +111,7 @@ int main() {for (;;) break; printf("Hello world!\n");return 0;}
106111
^
107112
```
108113

109-
### clang-tidy output
114+
### clang-tidy Example
110115

111116
```bash
112117
clang-tidy...............................................................Failed
@@ -125,8 +130,8 @@ Use -header-filter=.* to display errors from all non-system headers. Use -system
125130

126131
## Contributing
127132

128-
Contributions are very welcome, including submitting issues, PRs, etc.
133+
We welcome contributions! Whether it's fixing issues, suggesting improvements, or submitting pull requests, your support is greatly appreciated.
129134

130135
## License
131136

132-
[MIT](LICENSE)
137+
cpp-linter-hooks is licensed under the [MIT License](LICENSE)

Diff for: pyproject.toml

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
requires = ["setuptools>=45", "setuptools-scm"]
33
build-backend = "setuptools.build_meta"
44

5+
requires-python = ">=3.8"
6+
57
[project]
68
name = "cpp_linter_hooks"
79
description = "Automatically check c/c++ code with clang-format and clang-tidy"
@@ -21,7 +23,13 @@ classifiers = [
2123
"Operating System :: Microsoft :: Windows",
2224
"Operating System :: POSIX :: Linux",
2325
"Operating System :: MacOS",
24-
"Programming Language :: Python :: 3",
26+
"Programming Language :: Python :: 3.8",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Programming Language :: Python :: 3.14",
2533
"Topic :: Software Development :: Build Tools",
2634
]
2735
dependencies = [

0 commit comments

Comments
 (0)