Skip to content

Support empty bracket implicit index syntax.#331

Merged
mattcoley merged 3 commits into
masterfrom
support-empty-bracket-syntax
May 17, 2019
Merged

Support empty bracket implicit index syntax.#331
mattcoley merged 3 commits into
masterfrom
support-empty-bracket-syntax

Conversation

@mattcoley

@mattcoley mattcoley commented May 16, 2019

Copy link
Copy Markdown
Collaborator

It was not possible previously do something like list[3:] to get the sublist of all elements from index 3 to the end, as well as list[:3], the sublist of all elements from index 0 up to index 3.

@mattcoley mattcoley requested a review from boulter May 16, 2019 20:22
@mattcoley mattcoley changed the title Support empty bracket index syntax. Support empty bracket implicit index syntax. May 16, 2019
@codecov-io

codecov-io commented May 16, 2019

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@c3c310a). Click here to learn what that means.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #331   +/-   ##
=========================================
  Coverage          ?   71.54%           
  Complexity        ?     1580           
=========================================
  Files             ?      239           
  Lines             ?     4965           
  Branches          ?      805           
=========================================
  Hits              ?     3552           
  Misses            ?     1126           
  Partials          ?      287
Impacted Files Coverage Δ Complexity Δ
...va/com/hubspot/jinjava/el/ext/AstRangeBracket.java 69.49% <80%> (ø) 20 <0> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c3c310a...3819e7b. Read the comment docs.

@bgoodies

Copy link
Copy Markdown
Contributor

👍

}

Object start = property.eval(bindings, context);
Iterable<?> baseItr;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you could use a ternary here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I need to have a better eye out for refactoring code that I come across.

@mattcoley mattcoley merged commit 693c157 into master May 17, 2019
@mattcoley mattcoley deleted the support-empty-bracket-syntax branch May 17, 2019 17:29
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.54%. Comparing base (5f9cfbb) to head (3819e7b).
⚠️ Report is 2447 commits behind head on master.

Files with missing lines Patch % Lines
...va/com/hubspot/jinjava/el/ext/AstRangeBracket.java 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #331      +/-   ##
============================================
+ Coverage     71.51%   71.54%   +0.02%     
- Complexity     1576     1580       +4     
============================================
  Files           239      239              
  Lines          4957     4965       +8     
  Branches        800      805       +5     
============================================
+ Hits           3545     3552       +7     
  Misses         1126     1126              
- Partials        286      287       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

5 participants