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 Gherkin Linting to Megalinter Workflow and Update Implementation … #292

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ravindrapalaskar17
Copy link
Collaborator

@ravindrapalaskar17 ravindrapalaskar17 commented Sep 2, 2024

What type of PR is this?
Close the issue: - #142

Add one of the following kinds:

enhancement/feature
Documentation\

What this PR does / why we need it:
This PR includes the addition of Gherkin linting in the Megalinter workflow to lint the test contribution feature files, along with implementation guideline documentation

Which issue(s) this PR fixes:
Fixes #142

Open Points for Discussion:
Standard Name Length:
The standard name length for features, steps, and scenarios was initially set to 70 characters. However, after testing all feature files, we have adjusted it to 90 for features, 190 for steps, and 190 for scenarios.

List of No-Restricted-Tags:
Review and finalize the list of tags that should be restricted or allowed.

Max-Scenarios-Per-File:
The standard is 15 scenarios per file, but we have increased this limit to 50 scenarios per file.

Keyword Logical Order:
Discuss the logical order of keywords (Given, When, Then, And) and ensure it is consistently enforced.

New Line at EOF:
Decide whether the rule for enforcing a new line at the end of files should be turned on or off.

No-Restricted-Patterns:
Identify and agree on a list of words or patterns that should be avoided in the Feature, Background, and Scenario sections.

File Name Format:
Decide on a standard file naming convention: PascalCase, Title Case, camelCase, kebab-case, or snake_case.

Indentation:
Finalize the indentation standards for Gherkin files (e.g., number of spaces or tabs to use).

…Guidelines (#3)

* Create .gherkin-lintrc

* add gherkin lint in mega linter

* Create Gherkin-linting-implementation-guideline

* Update Gherkin-linting-implementation-guideline

* Update Gherkin-linting-implementation-guideline

* Delete documentation/Gherkin-linting-implementation-guideline

* Update API-linting-Implementation-Guideline.md

* Update API-linting-Implementation-Guideline.md

* fine tune linting rules

* customization of Indentation rule
Copy link

linux-foundation-easycla bot commented Sep 2, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ravindrapalaskar17 (7d06c50)

@Kevsy
Copy link
Collaborator

Kevsy commented Sep 2, 2024

Nice work @ravindrapalaskar17 !

For the Open Points for Discussion:

  • should each Feature require a description? (I'm not sure if that's covered by 'poor description' from the gherkin-lint docs)

@hdamker
Copy link
Collaborator

hdamker commented Sep 2, 2024

Thanks @ravindrapalaskar17!

Regarding:

File Name Format:
Decide on a standard file naming convention: PascalCase, Title Case, camelCase, kebab-case, or snake_case.

Within QualityOnDemand we have currently a mix of kebab-case and camelCase (following the formats of the components of the filename):
<api-name>-<operationId>.feature

cc: @jlurien

@rartych
Copy link
Collaborator

rartych commented Oct 10, 2024

Regarding:

File Name Format:
Decide on a standard file naming convention: PascalCase, Title Case, camelCase, kebab-case, or snake_case.

Within QualityOnDemand we have currently a mix of kebab-case and camelCase (following the formats of the components of the filename): <api-name>-<operationId>.feature

This format is allowed in API Testing Guidelines
As filename convention (not only casing) can be easily verified I propose to switch this rule off.

@ravindrapalaskar17
Copy link
Collaborator Author

Nice work @ravindrapalaskar17 !

For the Open Points for Discussion:

  • should each Feature require a description? (I'm not sure if that's covered by 'poor description' from the gherkin-lint docs)

This part is a configuration for the no-restricted-patterns rule, which is applied to various sections of Gherkin feature files. It helps restrict the use of certain terms or patterns in the description, feature, and background sections.
for E.g.
Initial Sample Terms: These are just examples of restricted terms (poor description, validate, verify, etc.), which can be customized or updated as per suggestions from CAMARA.

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.

Linting test definitions
4 participants