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 support for null #29

Merged
merged 1 commit into from
Nov 15, 2017
Merged

Conversation

MasseGuillaume
Copy link
Contributor

While implementing DisableSyntax.keywords in scalafix I came across the following bug:

[info]   java.lang.IllegalArgumentException: Unexpected config value ConfigNull(null) with unwrapped value null
[info]   at metaconfig.typesafeconfig.TypesafeConfig2Class$.loop$1(TypesafeConfig2Class.scala:42)
[info]   at metaconfig.typesafeconfig.TypesafeConfig2Class$.$anonfun$gimmeSafeConf$2(TypesafeConfig2Class.scala:32)

In TypesafeConfig indentifier without quotes are lifted two string automatically. For example, it's
possible to write both:

keywords = [
  override
]
keywords = [
  "override"
]

However if we write

keywords = [
  null
]

we get the error above

While implementing DisableSyntax.keywords in scalafix I came across the following bug:

```
[info]   java.lang.IllegalArgumentException: Unexpected config value ConfigNull(null) with unwrapped value null
[info]   at metaconfig.typesafeconfig.TypesafeConfig2Class$.loop$1(TypesafeConfig2Class.scala:42)
[info]   at metaconfig.typesafeconfig.TypesafeConfig2Class$.$anonfun$gimmeSafeConf$2(TypesafeConfig2Class.scala:32)
```

In TypesafeConfig indentifier without quotes are lifted two string automatically. For example, it's
possible to write both:

```
keywords = [
  override
]
```

```
keywords = [
  "override"
]
```

However if we write

```
keywords = [
  null
]
```

we get the error above
MasseGuillaume referenced this pull request in MasseGuillaume/scalafix Nov 15, 2017
Copy link
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I will release after merge.

</developer>
</developers>
developers +=
Developer(
Copy link
Member

@olafurpg olafurpg Nov 15, 2017

Choose a reason for hiding this comment

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

Why this change? It's not bad but it kind of distracts from the actual PR.

@olafurpg olafurpg merged commit 56caae8 into scalameta:master Nov 15, 2017
MasseGuillaume referenced this pull request in MasseGuillaume/scalafix Nov 16, 2017
MasseGuillaume referenced this pull request in MasseGuillaume/scalafix Nov 16, 2017
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.

2 participants