Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Add command line parameter to ignore specific projects #46

Closed
GeertvanHorrik opened this issue Dec 11, 2014 · 9 comments
Closed

Add command line parameter to ignore specific projects #46

GeertvanHorrik opened this issue Dec 11, 2014 · 9 comments
Assignees
Milestone

Comments

@GeertvanHorrik
Copy link
Contributor

Initiated by oxyplot/oxyplot#284

something like -ignore [path-to-csproj], comma separated. When walking though the sln, you just ignore the matching entries.

@GeertvanHorrik GeertvanHorrik self-assigned this Dec 11, 2014
@GeertvanHorrik GeertvanHorrik added this to the 2.1.0 milestone Dec 11, 2014
@GeertvanHorrik
Copy link
Contributor Author

Added argument parsing with unit tests.

@GeertvanHorrik
Copy link
Contributor Author

Written docs:

When specific projects should be ignored, use the -ignore option. This option accepts a comma separated list of projects to ignore:

GitLink.exe c:\source\catel -u https://github.com/catel/catel -f Catel.sln -ignore WindowsPhone,WindowsRuntime

Note that the ignore list uses Contains([ignoredProject]) to ignore items, so when use Windows, WindowsPhone will be ignored as well

@objorke
Copy link

objorke commented Dec 11, 2014

Great!

Maybe the ignore names could match by regular expressions? And multiple -ignore options could be allowed to avoid the comma separated list?

.... -f Catel.sln -ignore .*Windows(Phone|Runtime) -ignore .*Xamarin.*

@GeertvanHorrik
Copy link
Contributor Author

I am really bad with regex, but feel free to pr :)

@sevoku
Copy link

sevoku commented Dec 12, 2014

I think using Contains() is not really a good idea. Why not an exact (upper invriant) match using ToUpper() by default and maybe later with Regex support?

EDIT: sorry, case invariance is already there with ToLower

@GeertvanHorrik
Copy link
Contributor Author

See https://github.com/CatenaLogic/GitLink/blob/develop/src/GitLink/Extensions/ProjectExtensions.cs#L23

What would you propose instead? If you paste the code here, I will change it.

@sevoku
Copy link

sevoku commented Dec 12, 2014

Hhm, just without .Contains (see my comment on L33). And maybe later someone could add Regex support on the same place.

This allows to really exclude single projects and not all projects containing the specified string.

@GeertvanHorrik
Copy link
Contributor Author

Changing it now.

@GeertvanHorrik
Copy link
Contributor Author

Now uses string.Equals() instead of .Contains to ignore projects.

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

No branches or pull requests

3 participants