GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — constructor parameter parsing exception · Issue #232 · cpplint/cpplint

constructor parameter parsing exception #232

New issue
Copy link
New issue
Copy link
Open
Open
constructor parameter parsing exception#232
Copy link

Description

@sashao
sashao
opened on Nov 6, 2023
Issue body actions

cpplint fails to parse constructor like ResultException(_Pre_satisfies_(hr < 0) HRESULT hr)
error:

Traceback (most recent call last):
  File "/opt/homebrew/bin/cpplint", line 33, in <module>
    sys.exit(load_entry_point('cpplint==1.6.1', 'console_scripts', 'cpplint')())
  File "/opt/homebrew/Cellar/cpplint/1.6.1/libexec/lib/python3.10/site-packages/cpplint.py", line 6908, in main
    ProcessFile(filename, _cpplint_state.verbose_level)
  File "/opt/homebrew/Cellar/cpplint/1.6.1/libexec/lib/python3.10/site-packages/cpplint.py", line 6678, in ProcessFile
    ProcessFileData(filename, file_extension, lines, Error,
  File "/opt/homebrew/Cellar/cpplint/1.6.1/libexec/lib/python3.10/site-packages/cpplint.py", line 6506, in ProcessFileData
    ProcessLine(filename, file_extension, clean_lines, line,
  File "/opt/homebrew/Cellar/cpplint/1.6.1/libexec/lib/python3.10/site-packages/cpplint.py", line 6390, in ProcessLine
    CheckForNonStandardConstructs(filename, clean_lines, line,
  File "/opt/homebrew/Cellar/cpplint/1.6.1/libexec/lib/python3.10/site-packages/cpplint.py", line 3408, in CheckForNonStandardConstructs
    constructor_arg += ',' + constructor_args[i + 1]
IndexError: list index out of range
oomel@1111s-MacBook-Pro-4 plugins-framework % 
oomel@1111s-MacBook-Pro-4 plugins-framework % 
oomel@1111s-MacBook-Pro-4 plugins-framework % 
oomel@1111s-MacBook-Pro-4 plugins-framework % cpplint --versionCpplint fork (https://github.com/cpplint/cpplint)
cpplint 1.6.1
Python 3.10.13 (main, Aug 24 2023, 22:43:20) [Clang 14.0.0 (clang-1400.0.29.202)]

Sample file contents:

    class ResultException : public std::exception
    {
    public:
        //! Constructs a new ResultException from an existing FailureInfo.
        ResultException(const FailureInfo& failure) WI_NOEXCEPT :
            m_failure(failure)
        {
        }

        //! Constructs a new exception type from a given HRESULT (use only for constructing custom exception types).
        ResultException(_Pre_satisfies_(hr < 0) HRESULT hr) WI_NOEXCEPT :
            m_failure(CustomExceptionFailureInfo(hr))
        {
        }
    }:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.