- Update to 2.0.2:

* Drop Python 3.8
  * Don't err on non-const references by default
  * fix(indentation_namespace): false positive for MemInitLists
  * Fix missing comma between items in _CPP_HEADERS
  * Fix false positive for indented parameters in namespaces
  * IWYU: treat stdio.h the same way as cstdio
  * PEP 621: Migrate from setup.{py, cfg} to pyproject.toml
  * cpplint_clitest.py: Function names should be lowercase
  * suppress C++-only categories on C file extensions
  * You can now specify blocks of code that exclude linting with NOLINTBEGIN
    and NOLINTEND
  * The --filter option can now be only applied to a specific file or even a
    specific line through utilizing colons
  * NOLINT and NOLINTNEXTLINE comments now support a comma-separated list of
    categories
  * NOLINT and NOLINTNEXTLINE will now ignore categories known to be from
    clang-tidy
  * build/include-what-you-use no longer supports transitive headers from the
    header for the current module for parity with the style guide
  * build/include-what-you-use now supports a plethora of new functions
  * build/include-what-you-use will no longer err on similarly-named classes
    from other namespaces
  * Indented functions inside namespaces will now be correctly erred on
  * The check for C-style casts now looks for the standard fixed-width
    integer typenames instead of non-standard ones (e.g. int32_t instead of
    int32)
  * readability/braces will realize that C++20 concepts require a semicolon
  * C++20 headers will no longer be flagged as C headers
  * Processing C++ files through stdin/piping is now fixed

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cpplint?expand=0&rev=20
This commit is contained in:
2025-10-31 02:28:31 +00:00
committed by Git OBS Bridge
parent 0d3bbb2335
commit 8f2c3d6d69
8 changed files with 109 additions and 4587 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cpplint
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,19 +18,18 @@
%bcond_without libalternatives
Name: python-cpplint
Version: 1.6.1
Version: 2.0.2
Release: 0
Summary: An automated checker to make sure a C++ file follows Google's C++ style guide
License: BSD-3-Clause
URL: https://github.com/cpplint/cpplint
Source: https://files.pythonhosted.org/packages/source/c/cpplint/cpplint-%{version}.tar.gz
# PATCH-FIX-UPSTREAM drop-sre-compile.patch gh#cpplint/cpplint#214
Patch0: drop-sre-compile.patch
# PATCH-FIX-UPSTREAM python312.patch gh#cpplint/cpplint#243
Patch1: python312.patch
# PATCH-FIX-UPSTREAM deprecated-unittest-aliases.patch gh#cpplint/cpplint#182
Patch2: deprecated-unittest-aliases.patch
# PATCH-FIX-UPSTREAM gh#cpplint/cpplint#405
Patch0: do-not-use-codecs-open.patch
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module testfixtures}
@@ -51,10 +50,6 @@ in hopes that it can be merged in the future.
%prep
%autosetup -p1 -n cpplint-%{version}
sed -i -e '/^#!\//, 1d' cpplint.py
sed -i 's/pytest-runner==5.2//' setup.py
sed -i 's/pytest-cov//' test-requirements
sed -i 's/--cov-fail-under=75 --cov=cpplint//' setup.cfg
%build
%pyproject_wheel