-
Notifications
You must be signed in to change notification settings - Fork 4
feat!: rewrite to use cucumber messages #273
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
base: main
Are you sure you want to change the base?
Conversation
… compatibility kit
…r to catch errors
…ta, doc-strings, empty, examples-tables and minimal
…ooks-beforeall-error, hooks, hooks-attachment and hooks-conditional compatibility tests
✅
|
| Descriptor | Linter | Files | Fixed | Errors | Warnings | Elapsed time |
|---|---|---|---|---|---|---|
| ✅ ACTION | actionlint | 6 | 0 | 0 | 0.34s | |
| ✅ CPP | clang-format | 191 | 0 | 0 | 0 | 1.4s |
| ✅ DOCKERFILE | hadolint | 1 | 0 | 0 | 0.3s | |
| ✅ JSON | jsonlint | 8 | 0 | 0 | 0.19s | |
| ✅ JSON | prettier | 8 | 6 | 0 | 0 | 0.49s |
| markdownlint | 6 | 3 | 13 | 0 | 0.77s | |
| ✅ MARKDOWN | markdown-table-formatter | 6 | 3 | 0 | 0 | 0.29s |
| ✅ REPOSITORY | git_diff | yes | no | no | 0.02s | |
| ✅ REPOSITORY | grype | yes | no | no | 27.18s | |
| ✅ REPOSITORY | ls-lint | yes | no | no | 0.06s | |
| ✅ REPOSITORY | secretlint | yes | no | no | 2.15s | |
| ✅ REPOSITORY | syft | yes | no | no | 1.14s | |
| ✅ REPOSITORY | trivy | yes | no | no | 5.4s | |
| ✅ REPOSITORY | trivy-sbom | yes | no | no | 0.12s | |
| ✅ REPOSITORY | trufflehog | yes | no | no | 2.16s | |
| lychee | 82 | 1 | 0 | 6.63s | ||
| ✅ YAML | prettier | 10 | 0 | 0 | 0 | 0.5s |
| ✅ YAML | v8r | 10 | 0 | 0 | 5.11s | |
| ✅ YAML | yamllint | 10 | 0 | 0 | 0.4s |
Detailed Issues
⚠️ SPELL / lychee - 1 error
[404] https://github.com/yourname/amp-cucumber-cpp-runner.git | Network error: Not Found
📝 Summary
---------------------
🔍 Total..........153
✅ Successful.....152
⏳ Timeouts.........0
🔀 Redirected.......0
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........1
Errors in CONTRIBUTING.md
[404] https://github.com/yourname/amp-cucumber-cpp-runner.git | Network error: Not Found
⚠️ MARKDOWN / markdownlint - 13 errors
CHANGELOG.md:26 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:38 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:47 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:53 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:61 MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:65 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:70 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
CHANGELOG.md:79 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:90 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:98 MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:102 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:127 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
CHANGELOG.md:134 MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
See detailed reports in MegaLinter artifacts
Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)
- Documentation: Custom Flavors
- Command:
npx [email protected] --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_GIT_DIFF,REPOSITORY_GRYPE,REPOSITORY_LS_LINT,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R
Test Results26 tests 26 ✅ 13s ⏱️ Results for commit 3af273c. ♻️ This comment has been updated with latest results. |
…bled test suite map handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 291 out of 374 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| void Step::Given(const std::string& step) const | ||
| { | ||
| TestRunner::Instance().NestedStep(StepType::given, step); | ||
| // CucumberTestServer::Instance()->RunStep(step, cucumber::messages::pickle_step_type::CONTEXT); |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented-out code for nested step execution should either be implemented or removed. If this functionality is planned for future implementation, add a TODO comment explaining the plan and timeline.
|
|
||
| void PrettyPrinter::HandleTestRunFinished(const cucumber::messages::test_run_finished& testRunFinished) | ||
| { | ||
| /* TODO implement */ |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HandleTestRunFinished method contains a TODO comment but no implementation. Consider implementing this method or documenting why it's intentionally left empty.
| /* TODO implement */ | |
| // Intentionally left blank: PrettyPrinter does not currently render any | |
| // additional output when a test run finishes. This handler is provided | |
| // for interface completeness. | |
| (void)testRunFinished; |
| { | ||
| auto parameterIters = treeRegexp.RootBuilder().Children() | std::views::transform([¶meterRegistry](const GroupBuilder& groupBuilder) -> Parameter | ||
| { | ||
| return parameterRegistry.Lookup(""); |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lambda always looks up an empty string parameter name instead of using information from the groupBuilder. This appears to be incorrect - the groupBuilder parameter should likely be used to determine which parameter to look up.
| return parameterRegistry.Lookup(""); | |
| return parameterRegistry.Lookup(groupBuilder.Name()); |
…ove build configuration
… update related includes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 291 out of 377 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
cucumber_cpp/library/cucumber_expression/test/TestTransformation.cpp:15
- Empty line at the start of the file should be removed for consistency with other files in the codebase.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,72 @@ | |||
|
|
|||
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line at the start of the file should be removed for consistency with other files in the codebase.
| @@ -0,0 +1,185 @@ | |||
|
|
|||
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line at the start of the file should be removed for consistency with other files in the codebase.
| @@ -1,107 +1,103 @@ | |||
|
|
|||
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line at the start of the file should be removed for consistency with other files in the codebase.
| @@ -1,14 +1,12 @@ | |||
|
|
|||
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line at the start of the file should be removed for consistency with other files in the codebase.
| @@ -0,0 +1,23 @@ | |||
|
|
|||
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty line at the start of the file should be removed for consistency with other files in the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 291 out of 377 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # add_subdirectory(test) | ||
| # add_subdirectory(test_helper) |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented-out test subdirectories should either be implemented or removed. Leaving them commented suggests incomplete work or technical debt.
| # add_subdirectory(test) | |
| # add_subdirectory(test_helper) |
|
|
||
| add_subdirectory(helper) | ||
|
|
||
|
|
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove one of the duplicate empty lines before the if statement.
| void Step::Given(const std::string& step) const | ||
| { | ||
| TestRunner::Instance().NestedStep(StepType::given, step); | ||
| // CucumberTestServer::Instance()->RunStep(step, cucumber::messages::pickle_step_type::CONTEXT); |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented-out code or replace with a TODO comment explaining why this functionality is temporarily disabled and when it will be implemented.
| /* | ||
| std::optional<std::string> read_file( std::istream & is ) { | ||
| if( not is.seekg( 0, std::ios_base::seek_dir::end ) ) { | ||
| return std::nullopt; | ||
| } | ||
| auto const sz = is.tellg( ); | ||
| if( not is.seekg( 0 ) ) { | ||
| return std::nullopt; | ||
| } | ||
| auto result = std::string( '\0', static_cast<std::size_t>( sz ) ); | ||
| if( not is.read( result.data( ), sz ) ) { | ||
| return std::nullopt; | ||
| } | ||
| if( sz != is.gcount( ) ) { | ||
| return std::nullopt; | ||
| } | ||
| return result; | ||
| } | ||
| */ | ||
|
|
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this large commented-out code block. If this functionality might be needed later, consider moving it to a separate utility file or documenting why it's preserved.
| /* | |
| std::optional<std::string> read_file( std::istream & is ) { | |
| if( not is.seekg( 0, std::ios_base::seek_dir::end ) ) { | |
| return std::nullopt; | |
| } | |
| auto const sz = is.tellg( ); | |
| if( not is.seekg( 0 ) ) { | |
| return std::nullopt; | |
| } | |
| auto result = std::string( '\0', static_cast<std::size_t>( sz ) ); | |
| if( not is.read( result.data( ), sz ) ) { | |
| return std::nullopt; | |
| } | |
| if( sz != is.gcount( ) ) { | |
| return std::nullopt; | |
| } | |
| return result; | |
| } | |
| */ |
| target_link_libraries(cucumber_cpp.library.cucumber_expression.test PUBLIC | ||
| gmock_main | ||
| GTest::gmock_main | ||
| GTest::gmock |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The target 'gmock_main' on line 4 appears to be a duplicate of 'GTest::gmock_main' on line 5. This may cause build issues or ambiguity. Remove the non-namespaced version.
| GTest::gmock |
| return StringTo<T>(matches.begin()->str()); | ||
| if (matches.value.has_value()) | ||
| return StringTo<T>(matches.value.value()); | ||
| return {}; |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning an empty object when a value is not found may mask errors. Consider throwing an exception or returning std::nullopt to make the failure explicit.
| return {}; | |
| throw CucumberExpressionError{ | |
| "No value available to convert in CreateStreamConverter" | |
| }; |
| void signal_handler(int signal) | ||
| { | ||
| if (signal == SIGABRT) | ||
| std::cerr << "SIGABRT received\n"; | ||
| else | ||
| std::cerr << "Unexpected signal " << signal << " received\n"; | ||
| std::_Exit(EXIT_FAILURE); | ||
| } |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name 'signal_handler' is too generic. Consider renaming to 'abort_signal_handler' or 'cucumber_abort_handler' to better reflect its specific purpose.
| const cucumber::messages::location& Query::FindLocationOf(const cucumber::messages::pickle& pickle) const | ||
| { | ||
| const auto& lineage = FindLineageByUri(pickle.uri); | ||
| // if (lineage.examples) |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove or complete this commented-out conditional check. If examples handling is not yet implemented, add a TODO comment explaining what needs to be done.
| // if (lineage.examples) | |
| // TODO: When examples handling is implemented, use lineage.examples (e.g., example row location) | |
| // instead of always returning the scenario's location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 291 out of 380 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Updated include paths for Query to use the new query structure. - Modified Formatter and related classes to accept the new query type. - Added test directories and dummy test files for api, assemble, formatter, query, runtime, and util components. - Enhanced CMakeLists.txt files to include test executables and link necessary libraries. - Introduced a new Query class to encapsulate query-related functionalities and improve code organization. - Ensured all references to the old Query class are replaced with the new structure across the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 291 out of 400 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cli.add_flag("--fail-fast", options.failFast, "Stop execution on first failure"); | ||
| cli.add_option("--format", options.format, "specify the output format, optionally supply PATH to redirect formatter output.")->check(formatValidator); | ||
| cli.add_option("--format-options", options.formatOptions, "provide options for formatters"); | ||
| cli.add_option("--language", options.language, "Default langauge for feature files, eg 'en'")->default_str(options.language); |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'langauge' to 'language' in help text.
| cli.add_option("--language", options.language, "Default langauge for feature files, eg 'en'")->default_str(options.language); | |
| cli.add_option("--language", options.language, "Default language for feature files, eg 'en'")->default_str(options.language); |
|


This (internal) rewrite is to make amp-cucumber-cpp-runner cucumber-messages compatible. Both during runtime and during formatting.
This will enable amp-cucumber-cpp-runner to be compatible with other, standalone, formatters.