Skip to content

Fix false positive readability/braces warning for trailing comma on c… #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jordancharest
Copy link

…oncepts.

Currently a readability/braces error is triggered for C++20 concepts. This change ignores trailing semi-colons that follow concept definitions.

@jordancharest
Copy link
Author

CI failure

Traceback (most recent call last):
    File "setup.py", line 87, in <module>
      'lint': Lint
    File "/home/runner/work/cpplint/cpplint/.tox/python3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/home/runner/work/cpplint/cpplint/.tox/python3.7/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 177, in setup
      return run_commands(dist)
    File "/home/runner/work/cpplint/cpplint/.tox/python3.7/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 193, in run_commands
      dist.run_commands()
    File "/home/runner/work/cpplint/cpplint/.tox/python3.7/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
      self.run_command(cmd)
    File "/home/runner/work/cpplint/cpplint/.tox/python3.7/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command
      super().run_command(command)
    File "/home/runner/work/cpplint/cpplint/.tox/python3.7/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
      cmd_obj.run()
    File "/home/runner/work/cpplint/cpplint/.eggs/pytest_runner-5.2-py3.7.egg/ptr.py", line 209, in run
      return self.run_tests()
    File "/home/runner/work/cpplint/cpplint/.eggs/pytest_runner-5.2-py3.7.egg/ptr.py", line 220, in run_tests
      result_code = __import__('pytest').main()
    File "/home/runner/work/cpplint/cpplint/.eggs/pytest-7.4.0-py3.7.egg/pytest/__init__.py", line 5, in <module>
      from _pytest._code import ExceptionInfo
    File "/home/runner/work/cpplint/cpplint/.eggs/pytest-7.4.0-py3.7.egg/_pytest/_code/__init__.py", line 2, in <module>
      from .code import Code
    File "/home/runner/work/cpplint/cpplint/.eggs/pytest-7.4.0-py3.7.egg/_pytest/_code/code.py", line 35, in <module>
      import pluggy
    File "/home/runner/work/cpplint/cpplint/.eggs/pluggy-1.3.0-py3.7.egg/pluggy/__init__.py", line 23, in <module>
      from ._manager import PluginManager, PluginValidationError
    File "/home/runner/work/cpplint/cpplint/.eggs/pluggy-1.3.0-py3.7.egg/pluggy/_manager.py", line 3, in <module>
      import importlib.metadata
  ModuleNotFoundError: No module named 'importlib.metadata'
  Error: ERROR: InvocationError for command /home/runner/work/cpplint/cpplint/.tox/python3.7/bin/python setup.py test (exited with code 1)
___________________________________ summary ____________________________________
Error: ERROR:   python3.7: commands failed
Error: Process completed with exit code 1.

@aaronliu0130 aaronliu0130 linked an issue Mar 31, 2024 that may be closed by this pull request
Copy link
Member

@aaronliu0130 aaronliu0130 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you kindly write some tests? Also, I doubt that this would work on multi-line concepts. Maybe we could take some inspiration from structs' detection.

@aaronliu0130
Copy link
Member

Closing in favor of #288.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C++20 concepts require a semicolon after the braces
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy