gitfluff 0.3.3__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitfluff
3
- Version: 0.3.3
3
+ Version: 0.5.0
4
4
  Summary: Commit message linter and formatter
5
5
  Author-email: Na'aman Hirschfeld <nhirschfeld@gmail.com>
6
6
  License: MIT
@@ -25,28 +25,32 @@ Requires-Dist: certifi>=2024.7.4
25
25
 
26
26
  # gitfluff
27
27
 
28
- Commit message linter with presets, custom formats, and cleanup automation. Fully compliant with [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/).
28
+ Commit message linter with presets, custom formats, and cleanup automation. Fully compliant with [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). Skips linting while Git is creating a merge commit.
29
29
 
30
30
  This Python package distributes prebuilt `gitfluff` binaries. On first use, the correct release binary for your platform is downloaded and cached under `~/.cache/gitfluff`.
31
31
 
32
32
  ## Quick Start
33
33
 
34
- **Install with pip:**
34
+ **Install with uv:**
35
+
35
36
  ```bash
36
- pip install gitfluff
37
+ uv tool install gitfluff
37
38
  ```
38
39
 
39
40
  **Run without installation (uvx):**
41
+
40
42
  ```bash
41
43
  uvx gitfluff --version
42
44
  ```
43
45
 
44
46
  **Lint a commit message:**
47
+
45
48
  ```bash
46
49
  gitfluff lint .git/COMMIT_EDITMSG
47
50
  ```
48
51
 
49
52
  **Auto-clean and rewrite:**
53
+
50
54
  ```bash
51
55
  gitfluff lint .git/COMMIT_EDITMSG --write
52
56
  ```
@@ -56,11 +60,13 @@ gitfluff lint .git/COMMIT_EDITMSG --write
56
60
  ### Native Git Hook
57
61
 
58
62
  **Install commit-msg hook:**
63
+
59
64
  ```bash
60
65
  gitfluff hook install commit-msg
61
66
  ```
62
67
 
63
68
  **With auto-cleanup:**
69
+
64
70
  ```bash
65
71
  gitfluff hook install commit-msg --write
66
72
  ```
@@ -68,6 +74,7 @@ gitfluff hook install commit-msg --write
68
74
  ### pre-commit Framework
69
75
 
70
76
  **Add to `.pre-commit-config.yaml`:**
77
+
71
78
  ```yaml
72
79
  default_install_hook_types:
73
80
  - pre-commit
@@ -75,13 +82,15 @@ default_install_hook_types:
75
82
 
76
83
  repos:
77
84
  - repo: https://github.com/Goldziher/gitfluff
78
- rev: v0.3.3
85
+ rev: v0.5.0
79
86
  hooks:
80
87
  - id: gitfluff-lint
81
88
  stages: [commit-msg]
89
+ # args: ["--msg-pattern", "^JIRA-[0-9]+: .+"] # optional regex override
82
90
  ```
83
91
 
84
92
  **Install the hooks:**
93
+
85
94
  ```bash
86
95
  pre-commit install
87
96
  ```
@@ -89,6 +98,7 @@ pre-commit install
89
98
  ### Lefthook (uvx)
90
99
 
91
100
  **Add to `lefthook.yml`:**
101
+
92
102
  ```yaml
93
103
  commit-msg:
94
104
  commands:
@@ -97,6 +107,7 @@ commit-msg:
97
107
  ```
98
108
 
99
109
  **Install hooks:**
110
+
100
111
  ```bash
101
112
  npx lefthook install
102
113
  ```
@@ -116,7 +127,7 @@ Any setting can be left out; omit the file entirely to keep defaults.
116
127
 
117
128
  ## Advanced usage
118
129
 
119
- - Override rules per-invocation using CLI flags (e.g. `--preset`, `--exclude`, `--cleanup`, `--single-line`).
130
+ - Override rules per-invocation using CLI flags (e.g. `--preset`, `--msg-pattern`, `--cleanup-pattern`, `--exclude`, `--cleanup`, `--single-line`).
120
131
  - Set `GITFLUFF_BINARY` to point at a custom build when testing unpublished versions.
121
132
  - Clear the cache (`rm ~/.cache/gitfluff/gitfluff*`) to force a fresh download.
122
133
 
@@ -1,27 +1,31 @@
1
1
  # gitfluff
2
2
 
3
- Commit message linter with presets, custom formats, and cleanup automation. Fully compliant with [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/).
3
+ Commit message linter with presets, custom formats, and cleanup automation. Fully compliant with [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). Skips linting while Git is creating a merge commit.
4
4
 
5
5
  This Python package distributes prebuilt `gitfluff` binaries. On first use, the correct release binary for your platform is downloaded and cached under `~/.cache/gitfluff`.
6
6
 
7
7
  ## Quick Start
8
8
 
9
- **Install with pip:**
9
+ **Install with uv:**
10
+
10
11
  ```bash
11
- pip install gitfluff
12
+ uv tool install gitfluff
12
13
  ```
13
14
 
14
15
  **Run without installation (uvx):**
16
+
15
17
  ```bash
16
18
  uvx gitfluff --version
17
19
  ```
18
20
 
19
21
  **Lint a commit message:**
22
+
20
23
  ```bash
21
24
  gitfluff lint .git/COMMIT_EDITMSG
22
25
  ```
23
26
 
24
27
  **Auto-clean and rewrite:**
28
+
25
29
  ```bash
26
30
  gitfluff lint .git/COMMIT_EDITMSG --write
27
31
  ```
@@ -31,11 +35,13 @@ gitfluff lint .git/COMMIT_EDITMSG --write
31
35
  ### Native Git Hook
32
36
 
33
37
  **Install commit-msg hook:**
38
+
34
39
  ```bash
35
40
  gitfluff hook install commit-msg
36
41
  ```
37
42
 
38
43
  **With auto-cleanup:**
44
+
39
45
  ```bash
40
46
  gitfluff hook install commit-msg --write
41
47
  ```
@@ -43,6 +49,7 @@ gitfluff hook install commit-msg --write
43
49
  ### pre-commit Framework
44
50
 
45
51
  **Add to `.pre-commit-config.yaml`:**
52
+
46
53
  ```yaml
47
54
  default_install_hook_types:
48
55
  - pre-commit
@@ -50,13 +57,15 @@ default_install_hook_types:
50
57
 
51
58
  repos:
52
59
  - repo: https://github.com/Goldziher/gitfluff
53
- rev: v0.3.3
60
+ rev: v0.5.0
54
61
  hooks:
55
62
  - id: gitfluff-lint
56
63
  stages: [commit-msg]
64
+ # args: ["--msg-pattern", "^JIRA-[0-9]+: .+"] # optional regex override
57
65
  ```
58
66
 
59
67
  **Install the hooks:**
68
+
60
69
  ```bash
61
70
  pre-commit install
62
71
  ```
@@ -64,6 +73,7 @@ pre-commit install
64
73
  ### Lefthook (uvx)
65
74
 
66
75
  **Add to `lefthook.yml`:**
76
+
67
77
  ```yaml
68
78
  commit-msg:
69
79
  commands:
@@ -72,6 +82,7 @@ commit-msg:
72
82
  ```
73
83
 
74
84
  **Install hooks:**
85
+
75
86
  ```bash
76
87
  npx lefthook install
77
88
  ```
@@ -91,7 +102,7 @@ Any setting can be left out; omit the file entirely to keep defaults.
91
102
 
92
103
  ## Advanced usage
93
104
 
94
- - Override rules per-invocation using CLI flags (e.g. `--preset`, `--exclude`, `--cleanup`, `--single-line`).
105
+ - Override rules per-invocation using CLI flags (e.g. `--preset`, `--msg-pattern`, `--cleanup-pattern`, `--exclude`, `--cleanup`, `--single-line`).
95
106
  - Set `GITFLUFF_BINARY` to point at a custom build when testing unpublished versions.
96
107
  - Clear the cache (`rm ~/.cache/gitfluff/gitfluff*`) to force a fresh download.
97
108
 
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "0.3.3"
2
+ __version__ = "0.5.0"
@@ -23,9 +23,9 @@ def _platform_triple() -> str:
23
23
 
24
24
  if system == "windows":
25
25
  if machine in {"amd64", "x86_64"}:
26
- return "x86_64-pc-windows-msvc"
26
+ return "x86_64-pc-windows-gnu"
27
27
  if machine in {"x86", "i386", "i686"}:
28
- return "i686-pc-windows-msvc"
28
+ raise RuntimeError("32-bit Windows is not supported")
29
29
  elif system == "linux":
30
30
  if machine in {"amd64", "x86_64"}:
31
31
  return "x86_64-unknown-linux-gnu"
@@ -81,7 +81,9 @@ def _extract(archive: Path, ext: str, destination: Path) -> None:
81
81
  else:
82
82
  with tarfile.open(archive, "r:gz") as tar:
83
83
  for member in tar.getmembers():
84
- if member.name.endswith("gitfluff") or member.name.endswith("gitfluff.exe"):
84
+ if member.name.endswith("gitfluff") or member.name.endswith(
85
+ "gitfluff.exe"
86
+ ):
85
87
  with tar.extractfile(member) as src, destination.open("wb") as dst:
86
88
  dst.write(src.read())
87
89
  return
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gitfluff
3
- Version: 0.3.3
3
+ Version: 0.5.0
4
4
  Summary: Commit message linter and formatter
5
5
  Author-email: Na'aman Hirschfeld <nhirschfeld@gmail.com>
6
6
  License: MIT
@@ -25,28 +25,32 @@ Requires-Dist: certifi>=2024.7.4
25
25
 
26
26
  # gitfluff
27
27
 
28
- Commit message linter with presets, custom formats, and cleanup automation. Fully compliant with [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/).
28
+ Commit message linter with presets, custom formats, and cleanup automation. Fully compliant with [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). Skips linting while Git is creating a merge commit.
29
29
 
30
30
  This Python package distributes prebuilt `gitfluff` binaries. On first use, the correct release binary for your platform is downloaded and cached under `~/.cache/gitfluff`.
31
31
 
32
32
  ## Quick Start
33
33
 
34
- **Install with pip:**
34
+ **Install with uv:**
35
+
35
36
  ```bash
36
- pip install gitfluff
37
+ uv tool install gitfluff
37
38
  ```
38
39
 
39
40
  **Run without installation (uvx):**
41
+
40
42
  ```bash
41
43
  uvx gitfluff --version
42
44
  ```
43
45
 
44
46
  **Lint a commit message:**
47
+
45
48
  ```bash
46
49
  gitfluff lint .git/COMMIT_EDITMSG
47
50
  ```
48
51
 
49
52
  **Auto-clean and rewrite:**
53
+
50
54
  ```bash
51
55
  gitfluff lint .git/COMMIT_EDITMSG --write
52
56
  ```
@@ -56,11 +60,13 @@ gitfluff lint .git/COMMIT_EDITMSG --write
56
60
  ### Native Git Hook
57
61
 
58
62
  **Install commit-msg hook:**
63
+
59
64
  ```bash
60
65
  gitfluff hook install commit-msg
61
66
  ```
62
67
 
63
68
  **With auto-cleanup:**
69
+
64
70
  ```bash
65
71
  gitfluff hook install commit-msg --write
66
72
  ```
@@ -68,6 +74,7 @@ gitfluff hook install commit-msg --write
68
74
  ### pre-commit Framework
69
75
 
70
76
  **Add to `.pre-commit-config.yaml`:**
77
+
71
78
  ```yaml
72
79
  default_install_hook_types:
73
80
  - pre-commit
@@ -75,13 +82,15 @@ default_install_hook_types:
75
82
 
76
83
  repos:
77
84
  - repo: https://github.com/Goldziher/gitfluff
78
- rev: v0.3.3
85
+ rev: v0.5.0
79
86
  hooks:
80
87
  - id: gitfluff-lint
81
88
  stages: [commit-msg]
89
+ # args: ["--msg-pattern", "^JIRA-[0-9]+: .+"] # optional regex override
82
90
  ```
83
91
 
84
92
  **Install the hooks:**
93
+
85
94
  ```bash
86
95
  pre-commit install
87
96
  ```
@@ -89,6 +98,7 @@ pre-commit install
89
98
  ### Lefthook (uvx)
90
99
 
91
100
  **Add to `lefthook.yml`:**
101
+
92
102
  ```yaml
93
103
  commit-msg:
94
104
  commands:
@@ -97,6 +107,7 @@ commit-msg:
97
107
  ```
98
108
 
99
109
  **Install hooks:**
110
+
100
111
  ```bash
101
112
  npx lefthook install
102
113
  ```
@@ -116,7 +127,7 @@ Any setting can be left out; omit the file entirely to keep defaults.
116
127
 
117
128
  ## Advanced usage
118
129
 
119
- - Override rules per-invocation using CLI flags (e.g. `--preset`, `--exclude`, `--cleanup`, `--single-line`).
130
+ - Override rules per-invocation using CLI flags (e.g. `--preset`, `--msg-pattern`, `--cleanup-pattern`, `--exclude`, `--cleanup`, `--single-line`).
120
131
  - Set `GITFLUFF_BINARY` to point at a custom build when testing unpublished versions.
121
132
  - Clear the cache (`rm ~/.cache/gitfluff/gitfluff*`) to force a fresh download.
122
133
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gitfluff"
7
- version = "0.3.3"
7
+ version = "0.5.0"
8
8
  description = "Commit message linter and formatter"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes