Giter Site home page Giter Site logo

cucumber / tag-expressions Goto Github PK

View Code? Open in Web Editor NEW
8.0 70.0 8.0 5.06 MB

Cucumber tag expression parser

License: MIT License

Makefile 4.10% Go 6.03% Shell 0.10% Ruby 6.13% Java 8.30% TypeScript 5.08% Python 59.09% Perl 11.17%
polyglot-release go java javascript perl python ruby tidelift

tag-expressions's Issues

Not.to_string() conversion has unneeded double-parenthesis if the inner expression is a binary operator

๐Ÿ‘“ What did you see?

If a tag-expression contains a not operator that encapsulate a binary operator (and, or),
the string conversion currently leads to double-parenthesis (unnecessary tautology).
This makes the textual string less readable and understandable.

EXAMPLE:

# SOURCE: testdata/parsing.yml
# HINT: This data or similar examples are currently missing

- expression: 'not (a and b)'
  formatted.currently: 'not ( ( a and b ) )'
  formatted.should_be: 'not ( a and b )'

REASONS:

  • The binary operators put already parenthesis around their boolean expression during string conversion
  • If the not operator does the same (as it currently is implemented), we get two groups of parenthensis

AFFECTED:

  • ALL tag-expression implementations

โœ… What did you expect to see?

Only one parenthesis grouping, like the formatted.should_be case shown in the example above.

๐Ÿ“ฆ Which tool/library version are you using?

I added additional case to the testdata/parsing.yml in my local workspace and run Java, Javascript and Go implementations.
Each failed the new additional tests.
The non-tested implementations (Ruby and Perl) are also be affected (as expected), by inspection of their implementation.

๐Ÿ”ฌ How could we reproduce it?

Add the following test-data items to testdata/parsing.yml:

# SOURCE: testdata/parsing.yml

# BAD_EXAMPLES (how the string output currently is):

- expression: 'not (a and b)'
  formatted: 'not ( ( a and b ) )'
- expression: 'not (a or b)'
  formatted: 'not ( ( a or b ) )'
- expression: 'not (a and b) and c or not (d or f)'
  formatted: '( ( not ( ( a and b ) ) and c ) or not ( ( d or f ) ) )'

# GOOD_EXAMPLES (how the output should be):

- expression: 'not (a and b)'
  formatted: 'not ( a and b )'
- expression: 'not (a or b)'
  formatted: 'not ( a or b )'
- expression: 'not (a and b) and c or not (d or f)'
  formatted: '( ( not ( a and b ) and c ) or not ( d or f ) )'

Steps to reproduce the behavior:

  1. Update the local workspace to the current HEAD of the GitHub:/cucumber/tag-expression repository.
  2. Patch the testdata file
  3. Run the tests for each implementation

๐Ÿ“š Any additional context?

Nope.

Perl: Automate releases

We've adopted a release process based on GitHub Actions - documented in RELEASING.md

In order to automate Perl releases, we need a new .github/workflows/release-cpan.yml

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

This repository currently has no open or pending branches.


  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: ^*.gemspec
Error type: Invalid regular expression: ^*.gemspec

Python: Automate releases

We've adopted a release process based on GitHub Actions - documented in RELEASING.md

In order to automate Python releases, we need a new .github/workflows/release-pypi.yml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.