Skip to content
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

Add C++20 three-way comparison operator #49

Merged

Conversation

Farigh
Copy link
Contributor

@Farigh Farigh commented Sep 14, 2023

The new operator, also known as the spaceship operator, was introduced in the C++20 standard.

The NSIQ parser now handles it properly.


I fixed some tests as well in this PR and added a GitHub Action to ensure this is performed for each PR from now on.
I greatly encourage you to enforce Checks on PR merge, this can be found in the branch protection settings :
image

@Farigh
Copy link
Contributor Author

Farigh commented Sep 14, 2023

Here is what the Test workflow looks like :
image

It initiates the work depicted in #44

@Farigh Farigh changed the title Add cpp20 three way comparison operator Add C++20 three-way comparison operator Sep 14, 2023
@Farigh Farigh force-pushed the add-cpp20-three-way-comparison-operator branch from 077f6f2 to 6382590 Compare September 14, 2023 19:41
@Farigh Farigh force-pushed the add-cpp20-three-way-comparison-operator branch from 6382590 to c8e7b64 Compare October 2, 2023 16:14
The new operator, also known as `spaceship operator` was introduced
in the C++20 standard.

The NSIQ parser now handles it properly.
The commit 430a4e7 changed
the rule processing to include comment rules.

The RULE_4_1_A_A expected to NOT run on comments.
The rule was updated to exclude comment lines.
The github action will run both test-suites:
  - rules
  - nsiqunittest
@Farigh
Copy link
Contributor Author

Farigh commented Oct 2, 2023

@kunaltyagi do you plan on merging this at some point by any chance?

@mosherubin
Copy link
Collaborator

@Farigh I'm a contributor, couldn't find your email, drop me a line at [email protected]

nsiqcppstyle_checker.py Outdated Show resolved Hide resolved
Copy link
Owner

@kunaltyagi kunaltyagi left a comment

Choose a reason for hiding this comment

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

Thanks for the neat update to tests @Farigh

@kunaltyagi kunaltyagi merged commit d776fae into kunaltyagi:master Oct 8, 2023
@Farigh Farigh deleted the add-cpp20-three-way-comparison-operator branch October 9, 2023 11:13
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.

3 participants