Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Is the type of the "exclude" element in project.json string or array? #604

Closed
ianhong opened this issue Sep 4, 2014 · 3 comments
Closed

Comments

@ianhong
Copy link

ianhong commented Sep 4, 2014

According to this wiki, https://github.com/aspnet/Home/wiki/Project.json-file, the type of the exclude element is string. But it actually it supports both of array and string. And, when we can specifiy multiple items like
1)
"exclude": [ "Controllers/.cs", "Dispatcher/.cs", "Filters/.cs", "Formatting/.cs",
"Http/.cs", "MessageHandlers/.cs", "Model/.cs", "ModelBinding/.cs"]
or
2) "exclude": "Controllers/.cs;Dispatcher/.cs;Filters/.cs;Formatting/.cs;Http/.cs;MessageHandlers/.cs;Model/.cs;ModelBinding/.cs;"

I think it could be a bit confusing if one element supports both types. (VS reports a warning when array is used for the exclude element, but kre builds this without any problem.)

If we want to pick one of the type, I think it should be array instead of string; array is clearer than string when specifying mutlple items to exclude.

@bricelam
Copy link
Contributor

bricelam commented Sep 5, 2014

+1 for an array because it can span multiple lines.

@davidfowl
Copy link
Member

We had strings originally and added support for arrays. I'm fine removing the string support.

@Praburaj
Copy link
Contributor

Praburaj commented Sep 5, 2014

/CC @madskristensen - project.json intellisense needs to be updated for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants