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 name conversion functionallity to CName #360

Merged
merged 3 commits into from Jan 20, 2019

Conversation

takezoe
Copy link
Member

@takezoe takezoe commented Jan 19, 2019

  • Refactored existing code
    • Not use return
    • Avoid cast in CName#equals()
    • Use HashMap instead of WeakHashMap in Scala.js
  • Added name conversions from natural name
    • snakeCase
    • dashCase
    • upperCamelCase
    • lowerCamelCase

@codecov
Copy link

codecov bot commented Jan 19, 2019

Codecov Report

Merging #360 into master will decrease coverage by 83.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #360       +/-   ##
=========================================
- Coverage   83.07%     0%   -83.08%     
=========================================
  Files         156     56      -100     
  Lines        6010    108     -5902     
  Branches      595      8      -587     
=========================================
- Hits         4993      0     -4993     
+ Misses       1017    108      -909
Impacted Files Coverage Δ
.../scala/wvlet/airframe/metrics/TimeWindowUnit.scala 0% <0%> (-100%) ⬇️
...g/shared/src/main/scala/wvlet/log/LogSupport.scala 0% <0%> (-100%) ⬇️
...og/jvm/src/main/scala/wvlet/log/LoggerMXBean.scala 0% <0%> (-100%) ⬇️
...rc/main/scala/wvlet/airframe/metrics/package.scala 0% <0%> (-100%) ⬇️
...log/shared/src/main/scala/wvlet/log/LogLevel.scala 0% <0%> (-100%) ⬇️
...og/shared/src/main/scala/wvlet/log/LogRecord.scala 0% <0%> (-100%) ⬇️
...frame-log/jvm/src/main/scala/wvlet/log/Guard.scala 0% <0%> (-100%) ⬇️
...d/src/main/scala/wvlet/airframe/AirframeSpec.scala 0% <0%> (-100%) ⬇️
...ala/wvlet/airframe/msgpack/spi/MessageFormat.scala 0% <0%> (-100%) ⬇️
...c/main/scala/wvlet/airframe/msgpack/spi/Code.scala 0% <0%> (-100%) ⬇️
... and 139 more

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 d8836e4...88eefdb. Read the comment docs.

@codecov
Copy link

codecov bot commented Jan 19, 2019

Codecov Report

Merging #360 into master will increase coverage by 0.01%.
The diff coverage is 82.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #360      +/-   ##
==========================================
+ Coverage   83.07%   83.09%   +0.01%     
==========================================
  Files         156      156              
  Lines        6010     6011       +1     
  Branches      595      575      -20     
==========================================
+ Hits         4993     4995       +2     
+ Misses       1017     1016       -1
Impacted Files Coverage Δ
...rc/main/scala/wvlet/airframe/surface/package.scala 0% <0%> (ø) ⬆️
.../src/main/scala/wvlet/airframe/surface/CName.scala 80.95% <84.84%> (+2.9%) ⬆️

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 d8836e4...73c93d2. Read the comment docs.

@takezoe takezoe changed the title Refactor CName Add name conversion functionallity to CName Jan 20, 2019
@xerial
Copy link
Member

xerial commented Jan 20, 2019

@takezoe I think we should use a regular HashMap for Scala.js. For example by adding Compat.newWeakHashMap = ...

@takezoe
Copy link
Member Author

takezoe commented Jan 20, 2019

@xerial Got it. Thanks for your advise!

@xerial
Copy link
Member

xerial commented Jan 20, 2019

ok. LGTM. It’s OK to merge this by yourself as a committer :)

@takezoe takezoe merged commit 366caca into wvlet:master Jan 20, 2019
@takezoe takezoe deleted the refactor-cname branch January 20, 2019 07:58
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.

None yet

2 participants