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
5 changes: 0 additions & 5 deletions .changeset/run-js-hook-fix.md

This file was deleted.

2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "comment-checker",
"version": "0.3.0",
"version": "0.3.1",
"description": "PostToolUse hook that flags unnecessary comments. Runs comment-checker --strip, then direnv exec if it is missing. Names flake.nix when that is why it is missing.",
"author": {
"name": "systemfsoftware",
Expand Down
15 changes: 10 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

[workspace]
members = ["crates/*"]
resolver = "2"
default-members = ["crates/comment-checker"]

[workspace.package]
version = "0.3.0"
version = "0.3.1"
edition = "2024"
rust-version = "1.85"
license = "Apache-2.0"
Expand All @@ -13,13 +14,17 @@ repository = "https://github.com/systemfsoftware/claude-code-comment-checker"
[workspace.lints.rust]
unsafe_code = "deny"

[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
pedantic = { level = "warn", priority = -1 }
[workspace.lints.clippy.all]
level = "deny"
priority = -1

[workspace.lints.clippy.pedantic]
level = "warn"
priority = -1

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"
panic = "abort"
panic = "abort"
27 changes: 20 additions & 7 deletions crates/comment-checker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

[package]
name = "claude-code-comment-checker"
version = "0.3.0"
version = "0.3.1"
edition = "2024"
rust-version = "1.85"
license = "Apache-2.0"
description = "Comment checker hook for Claude Code — flags genuinely unnecessary comments, spares justified ones"
repository = "https://github.com/systemfsoftware/claude-code-comment-checker"
keywords = ["comments", "tree-sitter", "claude-code", "hook"]
categories = ["command-line-utilities", "development-tools"]
keywords = ["comments","tree-sitter","claude-code","hook"]
categories = ["command-line-utilities","development-tools"]

[lib]
name = "claude_code_comment_checker"
Expand All @@ -18,16 +19,28 @@ name = "comment-checker"
path = "src/main.rs"

[dependencies]
clap = { version = "4", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tree-sitter = "0.26"
tree-sitter-language-pack = { version = "1.14", default-features = false }

[dependencies.clap]
version = "4"
features = ["derive"]

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.tree-sitter-language-pack]
version = "1.14"
default-features = false

[dev-dependencies]
proptest = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"

[dev-dependencies.serde]
version = "1"
features = ["derive"]

[lints]
workspace = true
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
overlays = [ (import rust-overlay) ];
};
in f pkgs);
version = "0.3.0";
version = "0.3.1";
mkCommentChecker = pkgs:
let
target = {
Expand Down
4 changes: 4 additions & 0 deletions npm/packages/comment-checker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@

- This repository is also a Claude Code plugin. Enabling it runs a PostToolUse hook that tries `comment-checker --strip`, then `direnv exec`. If both miss and the project has `flake.nix`, the error tells you to run `direnv allow` or `nix develop`.
- `--strip` deletes whole-line flagged comments from the file named in the hook payload. Without the flag, the hook still only reports. After a strip, the message names a code change to make — rename, extract, or tighten a type — instead of asking you to delete the comment.

## 0.3.1

- The `PostToolUse` hook is shipped as compiled `run.js` instead of `run.ts`, so it runs on Deno versions that refuse type-stripping inside `node_modules`. Type-checking is preserved through JSDoc annotations and `checkJs` in `hooks/deno.jsonc`.
2 changes: 1 addition & 1 deletion npm/packages/comment-checker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@systemfsoftware/claude-code-comment-checker",
"version": "0.3.0",
"version": "0.3.1",
"description": "Claude Code PostToolUse hook that blocks unnecessary comments (npm distribution launcher)",
"license": "Apache-2.0",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "claude-code-comment-checker",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"type": "module",
"packageManager": "pnpm@11.21.0",
Expand Down