mirror of
https://github.com/kucherenko/jscpd.git
synced 2026-09-19 08:11:03 +08:00
a2da469f5e
The `jscpd` hook in .pre-commit-hooks.yaml switches from `language: node` to `language: python`: pre-commit now `pip install`s this repository, whose new root pyproject.toml is an empty project that depends on the `jscpd` wheel of the same version, so the hook needs no Node.js on the machine. pre-commit is itself a Python tool, so Python is always there. The root package.json existed only for the node hook and is removed; sync-version.mjs now keeps pyproject.toml's version and `jscpd==` pin in step with rust/package.json instead (mapped to PEP 440 the same way build-pypi-wheels.py does) and verifies both before a release. Verified with `pre-commit try-repo . jscpd` against locally built 5.2.0 wheels. Tags up to v5.2.0 keep the node hook, since a hook is read from the pinned rev. Claude-Session: https://claude.ai/code/session_01WztdFKZAwW9b51iJe9zhtV
10 lines
286 B
YAML
10 lines
286 B
YAML
---
|
|
- id: jscpd
|
|
name: Check for duplicated code
|
|
entry: jscpd
|
|
args: ["--exit-code", "1"]
|
|
# Installs the PyPI wheel (pyproject.toml pins jscpd==<this rev's version>),
|
|
# so the hook needs no Node.js. Up to v5.2.0 the hook was `language: node`.
|
|
language: python
|
|
types: [text]
|