diff --git a/.gitignore b/.gitignore index 3c1a48d..2f68f06 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /vcs-diff-lint-*.tar.gz +/vcs-diff-lint-testdata-1.0.0.bundle diff --git a/sources b/sources index a62199f..0058039 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (vcs-diff-lint-4.tar.gz) = 8e1620b33efa4069d80ac4df307efa1a11104e65f24a41313356e234ec4762bca78bce12251571cff083ec179f69688593e6769f4069f382af08e3a92b34897f +SHA512 (vcs-diff-lint-6.7.tar.gz) = 0ac37a5b22309811d636aa4123c513df5e9f21ebac9df94b599dd6d04d293088c96c68b46675fb32bdd8345b3a7c73b60b7725103344246aaccbab8c779f69ae +SHA512 (vcs-diff-lint-testdata-1.0.0.bundle) = 59da14b42cf00ee793962784240e580a884312be3d1de1d7edc020c56c43afd4a6b6d4492d850a007b330add5569f45e48e764b1a0f6d09c0c8c350c7aa0320e diff --git a/vcs-diff-lint.spec b/vcs-diff-lint.spec index 7747421..e706c6d 100644 --- a/vcs-diff-lint.spec +++ b/vcs-diff-lint.spec @@ -1,20 +1,42 @@ Name: vcs-diff-lint -Version: 4 -Release: 1%{?dist} +Version: 6.7 +Release: 2%{?dist} Summary: VCS Differential Code Analysis Tool BuildArch: noarch -License: GPLv2+ +%if 0%{?rhel} == 10 +# missing csdiff / pylint +%bcond_with check +%else +%bcond_without check +%endif + +License: GPL-2.0-or-later URL: https://github.com/fedora-copr/vcs-diff-lint # Source is created by: # git clone %%url && cd vcs-diff-lint # tito build --tgz --tag %%name-%%version-%%release Source0: %name-%version.tar.gz +Source1: https://github.com/praiskup/vcs-diff-lint-testdata/releases/download/v1.0.0/vcs-diff-lint-testdata-1.0.0.bundle + Requires: csdiff -Requires: git -Requires: pylint -Requires: python3-mypy +Requires: git-core +Recommends: pylint +Recommends: python3-mypy +Recommends: python3-types-requests +Recommends: ruff +Recommends: yamllint + +%if %{with check} +BuildRequires: csdiff +BuildRequires: git-core +BuildRequires: pylint +BuildRequires: rpmdevtools +BuildRequires: python3-pytest +BuildRequires: yamllint +%endif + %description Analyze code, and print only reports related to a particular change. @@ -29,6 +51,9 @@ added (or even fixed, as opt-in) analyzers' warnings. %prep %autosetup +%if %{with check} +cp %{SOURCE1} ./ +%endif %build @@ -40,15 +65,67 @@ install -d %buildroot%_bindir install -p vcs-diff-lint %buildroot%_bindir install -p vcs-diff-lint-csdiff-pylint %buildroot%_bindir install -p vcs-diff-lint-csdiff-mypy %buildroot%_bindir +install -p vcs-diff-lint-csdiff-ruff %buildroot%_bindir +install -p vcs-diff-lint-csdiff-yamllint %buildroot%_bindir + +%if %{with check} +%check +./run-tests.sh --no-cov +%endif %files %license LICENSE -%doc README +%doc README.md %_bindir/vcs-diff-lint* %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 6.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Sun Apr 26 2026 Pavel Raiskup 6.7-1 +- Handle (no traceback) "invalid-syntax" code from Ruff +- log.debug() all git commands +- do not let "git apply" pollute stderr with whitespace errors + +* Fri Apr 24 2026 Pavel Raiskup 6.6-1 +- Fix stdout buffering + +* Fri Apr 24 2026 Pavel Raiskup 6.5-1 +- yamllint support +- depend on git-core instead of git + +* Wed Oct 16 2024 Pavel Raiskup 6.4-1 +- add a basic test-suite +- drop duplicated check for empty list of changed files + +* Fri Sep 20 2024 Pavel Raiskup 6.3-1 +- don't require all the linters, just recommend them +- use requested linters only if they are available +- nicer info/debug output + +* Sat Sep 07 2024 Pavel Raiskup 6.2-1 +- drop unnecessary newline in the output +- ruff: don't prefix the error locations with absolute path +- ruff: don't optimize out the full Ruff run +- print the git sha1 being analyzed +- bugfix: correct matching filenames with endswith() + +* Wed Aug 28 2024 Pavel Raiskup 6.1-1 +- rpm: use SPDX License format + +* Wed Aug 28 2024 Pavel Raiskup 6-1 +- bugfix: correctly honor file renames +- bugfix: fix subproject detection for git worktree +- ruff: do full project scans (since Ruff is fast enough) +- check the new (changed) code in a side-directory + +* Mon Aug 26 2024 Pavel Raiskup - 5-1 +- support for fast "ruff" analyser +- --linter-tag option added +- subproject detection by .vcs-diff-lint.yml + * Fri Nov 18 2022 Pavel Raiskup 4-1 - don't print Mypy errors from files that are not explicitly analyzed